Re:[Tktable] help regarding tktable
by Shawn Kielty other posts by this author
Oct 17 2004 8:41PM messages near this date
RE: [Tktable] help regarding tktable
|
[Tktable] Problem with Tile--is this the right list?
-----Original Message-----
From: tktable-users-admin@[...].net
[mailto:tktable-users-admin@[...].net]On Behalf Of Sanjay Soni
Sent: Wednesday, September 22, 2004 10:02 PM
To: tktable-users@[...].net
Subject: [Tktable] help regarding tktable
Hi,
I am new user of tktable and having some problems. Can anybody please tell
me
- How to insert widgets like combobox, buttons, entryfield into tktable
cells.
toplevel .a
table .a.b
pack .a.b
button .a.b.c
.a.b window configure 0,0 -window .a.b.c
.a.b window configure 0,0 -window .a.b.c -sticky nesw
- Single click on a cell puts into editable mode, I want the cell to be
selected on single click and editable on double click
I think that this requires that you rewrite the bindings for the mouse
events that you need to change. You can get the behavior of button 1 into a
double click by copying the binding for the single click These are bound to
the tag for the class of widgets "Table." You can also bind to the tag for
the widget. The table bindings are in the file TkTable.tcl -- if you want
an example of how to do it. Try something like this:
bind Table <Double-1> [bind Table <ButtonRelease-1>]
Then add a binding to select for a single click --
bind Table <ButtonRelease-1> {.a.b selection set [%W index @%x,%y ]}
- Clicking on a header selects the row or column, I want to disable this
feature
- How to detect the type and position of mouse events on tktable, like
leftclick, rightclick on (row, col)
Check the bind entry in the manual/Docs for tktable -- which describes the
way I just found out in the binding above. The winfo command has some ways
to determine this too.
Happy hacking
Shawn
Attachments:
unknown1
|