tk-var

(tk-var varname)
returns code of a Tk variable to associate with a checkbutton etc. Can be accessed by the procedures get-tk-var and 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