Am 13.03.23 um 17:05 schrieb Ralf Fassel:
I have a tablelist, where the <<ListBoxSelect>> command is a
time-consuming operation, so I want to invoke it only in some columns,
but not in others.
Especially column 1 is configured
-editwindow checkbutton \
-labelwindow checkbutton \
and when I click the checkbutton in that column, I do *not* want to
invoke the <<ListBoxSelect>> binding.
Is there some easy way to achieve this?
I also have
-editstartcommand [namespace code [list set_active_image 1]] \
-editendcommand [namespace code [list set_active_image 0]] \
configured on the tablelist itself, where I check for column 1 and set
checked/unchecked images, so I could prohibit <<ListBoxSelect>> while
'editing' column 1, but maybe there is a smarter way?
TNX
R'
bind [$tbl bodytag] <Button-1> {onBtn1 %W %x %y}
proc onBtn1 {w x y} {
lassign [tablelist::convEventFields $w $x $y] tbl x y
global clickedCol
set clickedCol [$tbl nearestcolumn $x]
puts $clickedCol
}
Te above code sets the global variable clickedCol to the column index of
the clicked column. Your callback for the virtual event
<<ListBoxSelect>> could then make use of this variable to suppress the time-consuming operation for some of the columns.
I have a tablelist, where the <<ListBoxSelect>> command is a
time-consuming operation, so I want to invoke it only in some columns,
but not in others.
Especially column 1 is configured
-editwindow checkbutton \
-labelwindow checkbutton \
and when I click the checkbutton in that column, I do *not* want to
invoke the <<ListBoxSelect>> binding.
Is there some easy way to achieve this?
I also have
-editstartcommand [namespace code [list set_active_image 1]] \
-editendcommand [namespace code [list set_active_image 0]] \
configured on the tablelist itself, where I check for column 1 and set checked/unchecked images, so I could prohibit <<ListBoxSelect>> while 'editing' column 1, but maybe there is a smarter way?
TNX
R'
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 493 |
Nodes: | 16 (2 / 14) |
Uptime: | 32:01:25 |
Calls: | 9,740 |
Files: | 13,741 |
Messages: | 6,183,232 |