Skip to content
Chris Petersen edited this page Oct 16, 2014 · 2 revisions

glgui-container provides a minimal container widget. Other widgets need to be added to it to make it useful. It can be used instead of the gui parameter when creating and referring other widgets.

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

Example

Example1: Make a login container with a numeric keypad and pin entry string. Finally hide the entire container group.

(set! gui:numpad (glgui-container gui 10 10 280 170))
(glgui-box gui:numpad 0 0 280 170 Grey)
(set! gui:numpad:keypad (glgui-keypad gui:numpad 0 0 280 140 fnt_24.fnt keypad:numeric))
(glgui-label gui:numpad 0 140 175 25 "Pin:" fnt_24.fnt White)
(set! gui:numpad:label (glgui-label gui:numpad 175 145 150 0 "" fnt_24.fnt White))
(glgui-widget-set! gui:numpad gui:numpad:label 'focus #t)
;; Try with the next line commented and without.
(glgui-widget-set! gui gui:numpad 'hidden #t)

Clone this wiki locally