Displaying 2 results from an estimated 2 matches for "tkindex".
Did you mean:
tcindex
2003 Jul 29
1
Tktable active cell
...mple:
When I click
> into a cell, a message box should open with the information of
the
> location of the cell where I clicked in. <SNIP> So I only
> need to know how to get the possition of the active cell.
Thomas,
Getting the active cell is easy, just use :
row <- tclvalue(tkindex(table1,"active","row"))
col <- tclvalue(tkindex(table1,"active","col"))
But if you try to catch the left-button-click event and then
display the cell coordinates in a message box, the problem is
that your event handler will be run BEFORE the default e...
2016 Apr 29
2
tcltk: click and return table cell index
I'm struggling mightily with what should be a simple task...when a user
clicks on a cell in a tcltk table widget, I need to know which cell was
clicked.
One idea that gives a cryptic error:
tkbind(table1, "<Button-1>", function(x, y){
tcl(table1, "index", x, y)
}
# x, y give pixel coordinates; "index" should give cell coordinates, but
format must be