2 Widget Gallery
This section shows the main widgets available in the Racket Graphical User Interface Toolkit. Each image is a link to the documentation of the relevant widget.
(define check-box (new check-box% (parent panel) (label "Check Box") (value #t)))
(define combo-field (new combo-field% (label "Combo") (parent panel) (choices (list "Field")) (init-value "Field")))
(define editor-canvas (new editor-canvas% (parent panel) (label "Editor Canvas"))) (define text (new text%)) (send text insert "Editor Canvas") (send editor-canvas set-editor text)
(define group-box-panel (new group-box-panel% (parent panel) (label "Group Box Panel")))
(define list-box (new list-box% (label "List Box") (parent (new horizontal-panel% (parent panel) (style (list 'border)))) (choices (list "Item 0" "Item 1" "Item 2")) (style (list 'single 'column-headers)) (columns (list "First Column"))))
(define menu-bar (new menu-bar% (parent frame))) (new menu% (label "&File") (parent menu-bar)) (new menu% (label "&Edit") (parent menu-bar)) (new menu% (label "&Help") (parent menu-bar))
(define a-panel (new panel% (parent panel) (style (list 'border)))) (new message% (parent a-panel) (label "Panel"))
(define radio-box (new radio-box% (label "Radio Box") (parent panel) (choices (list "Button 0" "Button 1" "Button 2"))))
(define slider (new slider% (label "Slider") (parent panel) (min-value 0) (max-value 100) (init-value 42)))
(define tab-panel (new tab-panel% (parent panel) (choices (list "Tab 0" "Tab 1" "Tab 2"))))
(define text-field (new text-field% (label "Text") (parent panel) (init-value "Field")))