FInally, anyone whose used the label will have noticed that the pango markup application didn't work properly with the -text option. Don't worrry, now that's fixed and will be included in the next upload.
Here's a sample script from the Tcler's wiki
#!/bin/sh
# the next line restarts using tclsh \
exec tclsh "$0" "$@"
package require Gnocl
set etitle "Tcl/Gnocl 8.5"
proc setString {angle} {
return "Angle = $angle degs"
}
set angle 330
set string [setString $angle]
set lab [gnocl::label -textVariable string \ -baseFont {Sans 30} \ -angle $angle] set but [gnocl::button \
-icon "%#Refresh" \
-onClicked {
incr angle 15
if {$angle == "360" } {set angle 0}
set string [setString $angle]
$lab configure -angle $angle
}]
set box [gnocl::box -orientation vertical]
$box add $but
$box add $lab -fill {1 1} -expand 1
set win [gnocl::window -title $etitle \ -child $box \ -onDelete {exit} ]
gnocl::mainLoop And here's a screenshot:

No comments:
Post a Comment