get-tk-var

(get-tk-var varname)
reads the Tk variable varname which was installed by tk-var. Can be set by set-tk-var!.

Example: 

(define r (tk 'create-widget 'radiobutton #:text 'radio))
(tk/pack r)
(r 'configure #:variable (tk-var "radio") #:value "One")
(set-tk-var! "radio" "One")

From now on, the radio-button should appear selected.


© Author | Home | Sitemap