Skip to content

Commit 01b1719

Browse files
committed
Add list example
1 parent 0815032 commit 01b1719

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.org

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,25 @@ 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/dlg/iuplistdialog.html][iup:list]] (IupListDialog). You can display the items inline, make
1153+
the list a dropdown or add an editbox.
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")
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))))
11531171
#+end_src
11541172

11551173
** Get Param Dialog

0 commit comments

Comments
 (0)