In response to a support enquiry I received a few days ago, I’ve just added a new widget command for gnocl::text that returns the line and character position under specified window coordinates. Here’s how it can be used:
set txt [gnocl::text -wrapMode word -baseFont {ILShakeFest 12} ]
$txt lorem
gnocl::window -child $txt -widthRequest 320 -heightRequest 200
$txt configure -onButtonPress {
puts "x = %x y = %y ; index = [%w getIndex %x %y]"
}
Comments