Приветствую всех! Начал ковырять GUI в Racket и сразу встрял с tabs. Вот где встрял (прошу за код сильно не ругать, я только начал учить Racket):
#lang racket/gui
(define my-settings-hash (make-hash))
(define my-settings-hash "label" "Test")
(define my-settings-hash "width" 300)
(define my-settings-hash "height" 300)
(define my-tabs-list (list "Tab 0"
"Tab 1"
"Tab 2"))
(define root-wnd (new frame% [label (hash-ref my-settibgs-hash "label")]
[width (hash-ref my-settings-hash "width")]
[height (hash-ref my-settings-hash "height"]))
(define tab-panel (new tab-panel%
(parent root-wnd)
(choices my-tabs-list)
(callback
(lambda (tp e)
(case (send tp get-selection)
((0) (send tp change-children (lambda (children) (list a-panel))))
((1) (send tp change-children (lambda (children) (list b-panel))))
((2) (send tp change-children (lambda (children) (list a-panel)))))))))
(define a-panel (new panel%
(parent tab-panel)
(label "A-panel")))
(define b-panel (new panel%
(parent tab-panel)
(label "b-panel")))
(send frame show #t)