Specific Commands

Most widgets have specific commands, e. g. text widgets:

set text1 [text .t]
pack $text1
$text insert 1.0 "Hello World"

Here the same example “translated” to Chicken/Tk:

(define text1 (tk 'create-widget 'text))
(tk/pack text1)
(text1 'insert '(1 . 0) "Hello World")

Every sub-command other than create-widget and exec and get-id will be translated to a widget-specific command, in the example above insert to insert text into a text widget.


© Author | Home | Sitemap