Skip to content

Commit f45d6c4

Browse files
committed
Add list example
1 parent 0815032 commit f45d6c4

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.org

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,9 +1149,36 @@ export format is a [[https://www.tecgraf.puc-rio.br/iup/en/led.html][IUP LED fil
11491149

11501150
** List Dialog
11511151

1152+
Use [[http://webserver2.tecgraf.puc-rio.br/iup/en/elem/iuplist.html][iup:list]]. The list can be visible or can be dropped down. It also
1153+
can have an edit box for text input.
1154+
11521155
#+begin_src lisp :results silent :tangle examples/dialogs.lisp
1156+
(defun iuplist ()
1157+
(iup:with-iup ()
1158+
(let* ((frame (iup:frame
1159+
(iup:vbox (loop for list in (list (iup:list :value 1 :tip "List 1" :multiple :yes)
1160+
(iup:list :value 2 :tip "list 2" :dropdown :yes)
1161+
(iup:list :value 3 :tip "List 3" :editbox :yes))
1162+
do (loop for i from 1 upto 3
1163+
do (setf (iup:attribute list i)
1164+
(format nil "Item ~A" i)))
1165+
collect list))
1166+
:title "IUP List"))
1167+
(dialog (iup:dialog frame :menu "menu" :title "a title")))
1168+
(iup:map dialog)
1169+
(iup:show dialog)
1170+
(iup:main-loop))))
1171+
1172+
#-sbcl (iuplist)
1173+
1174+
,#+sbcl
1175+
(sb-int:with-float-traps-masked
1176+
(:divide-by-zero :invalid)
1177+
(iuplist))
11531178
#+end_src
11541179

1180+
Note that [[http://webserver2.tecgraf.puc-rio.br/iup/en/dlg/iuplistdialog.html%20][ListDialog]] is currently not supported.
1181+
11551182
** Get Param Dialog
11561183

11571184
#+begin_src lisp :results silent :tangle examples/dialogs.lisp

0 commit comments

Comments
 (0)