This is an empty page.
Enter page contents here or click cancel to leave it empty.
# tagRollover.tcl #!/bin/sh # the next line restarts using tclsh \ exec tclsh "$0" "$@" package require Gnocl set text [gnocl::text ] $text tag create _tag_default \ -onEvent { set t %t set w %w if { $t == "motionNotify" } { set oldClr blue ;# [$w tag cget bold -foreground] $w tag configure _tag_rollOver -foreground $oldClr } } $text tag create _tag_rollOver \ -fontWeight bold \ -foreground blue \ -onEvent { set t %t set w %w if { $t == "motionNotify" } { set oldClr blue ;# [$w tag cget bold -foreground] $w tag configure _tag_rollOver -foreground red } } $text configure -onKeyPress { $text tag apply {0 0} end -tags _tag_default } $text insert end "This is " -tags _tag_default $text insert end "Gnocl" -tags _tag_rollOver $text insert end "!\n" -tags _tag_default gnocl::window -title "Text TagRollover Effext" -child $text gnocl::mainLoop
enter categories here |
---|