- assigned_to: nobody --> hobbs
Hello,
The default cursor for tk table is "xterm". This is good for cells which
can be edited by the user. However, cells in title rows and columns
should have a normal cursor as these cells are in disabled state by
default.
Since it is not possible to create bindings for individual cells or
tagnames in table like canvas or text widget allows (correct me if I am
wrong here), I am currently using the following to acheive this effect:
# The cursor should be changed to normal for title tags
# and to "xterm" for regular cells in the table
bind .tb <Motion> {
if {[%W tag includes title @%x,%y]} {
%W configure -cursor {}
} else {
%W configure -cursor xterm
} ;# End of if else stmt
} ;# End of bind motion script
I, however, suspect that there is better way of doing this than above.
Moreover, this does not display the "crosshair" cursor on cell boundries
anymore. Also, setting a binding on mouse-motion may degrade its
performance.
Please let me know the best way of setting the mouse cursor for the
title area.
Thanks,
Hemang.
--------------------------------------------------------------------
Hemang Lavana wrote:
...
> Since it is not possible to create bindings for individual cells or
> tagnames in table like canvas or text widget allows (correct me if I am
> wrong here), I am currently using the following to acheive this effect:
Unfortunately that is currently the best way to do it.
I think I can fairly easily add a -titlecursor option
(like the -bdcursor). This will have to wait until I
get back from Germany though (mid-Jan), but we can get
it into your next TclDirect CD version.
--
Jeff Hobbs