-
Notifications
You must be signed in to change notification settings - Fork 87
glgui dropdownbox
Chris Petersen edited this page Oct 16, 2014
·
8 revisions
glgui-dropdownbox create a dropdown box widget for choosing from a list of items. If there is not enough space below the box for the list to show it opens above the selected item.
Parameter | Description |
---|---|
g | Graphical User Interface (GUI) for this widget |
x | Lower left corner along the x-axis in pixels |
y | Lower left corner along the y-axis in pixels |
w | Width of the element in pixels |
h | Height of the element in pixels |
lst | List of procedures for drawing the items to choose from |
arrowcolor | Color of the arrow icon |
bgcolor | Widget background color |
bordercolor | Drop down list border color, also goes between items. If procedures for drawing list items have alpha and the bgcolor has alpha (or is false) than the border color will show through |
Example 1: Make a dropdownbox at x=140,y=200, width 150, height 40 which has three entries, which are the strings "Ear" "Hand" and "Foot"
(define field_gradient (list (color:shuffle #xe8e9eaff) (color:shuffle #xe8e9eaff) (color:shuffle #xfefefeff) (color:shuffle #xfefefeff)))
(glgui-dropdownbox gui 140 200 150 40
(map (lambda (str)
(lambda (lg lw x y w h s) (if s (glgui:draw-box x y w h Grey))
(glgui:draw-text-left (+ x 5) y (- w 10) h str ascii_18.fnt Black)))
(list "Ear" "Hand" "Foot"))
Black field_gradient Black)
-
- accelerometer
- alist
- audio
- audioaux
- base64
- btle-scan
- camera
- cdb
- cgi
- config
- csv
- curl
- digest
- dmtx
- download
- eventloop
- fcgi
- fft
- generalized-arrays
- gps
- graph
- gyro
- hidapi
- hpdf
- html
- httpsclient
- hybridapp
- json
- lmdb
- ln_core
- ln_glcore
- ln_glgui
- ln_store
- localization
- localization_gui
- localnotification
- magnetometer
- mdns
- mqtt
- mqtt-store
- multitouch
- oauth
- orientation
- p256ecdsa
- png
- portaudio
- pregexp
- pressure
- prime
- pushnotification
- redcap
- rsa
- rtaudio
- rupi
- rotation
- sanestring
- scheduler
- serial
- sets
- settings
- simplexnoise
- sqlite
- ssax
- syntax-case
- timestamp
- ttf
- uiform
- url
- uuid
- vibrate
- videoplayer
- watchdog
- website
- xml
- zip