Skip to content

Add list example #51

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -1149,9 +1149,36 @@ export format is a [[https://www.tecgraf.puc-rio.br/iup/en/led.html][IUP LED fil

** List Dialog

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
can have an edit box for text input.

#+begin_src lisp :results silent :tangle examples/dialogs.lisp
(defun iuplist ()
(iup:with-iup ()
(let* ((frame (iup:frame
(iup:vbox (loop for list in (list (iup:list :value 1 :tip "List 1" :multiple :yes)
(iup:list :value 2 :tip "list 2" :dropdown :yes)
(iup:list :value 3 :tip "List 3" :editbox :yes))
do (loop for i from 1 upto 3
do (setf (iup:attribute list i)
(format nil "Item ~A" i)))
collect list))
:title "IUP List"))
(dialog (iup:dialog frame :menu "menu" :title "a title")))
(iup:map dialog)
(iup:show dialog)
(iup:main-loop))))

#-sbcl (iuplist)

,#+sbcl
(sb-int:with-float-traps-masked
(:divide-by-zero :invalid)
(iuplist))
#+end_src

Note that [[http://webserver2.tecgraf.puc-rio.br/iup/en/dlg/iuplistdialog.html%20][ListDialog]] is currently not supported.

** Get Param Dialog

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