Re: tablelist: <Return> the same as <Tab> when editing.
- From: Csaba Nemethi <csaba.nemethi@xxxxxxxxxxx>
- Date: Sun, 29 Jun 2008 21:52:51 +0200
Óscar Fuentes schrieb:
With the code below, when we are editing a cell, pressing <Tab>
terminates the edition, moves to the next editable cell and edits it.
I want to do that with the <Return> key.
After much trial and error (too much to mention) and turned very
confused about TableListEdit, TableListBody, etc, it is time to ask the
experts.
package require tablelist
set table [tablelist::tablelist .gr -stripebackground #e0e8f0 \
-columns {30 "One" \
10 "Two" right 10 "Three" right \
10 "Four" right 10 "Five" right} \
-selecttype cell -selectmode browse \
]
pack $table -expand true -fill both
foreach c { 1 2 3 4 } { $table columnconfigure $c -editable 1 }
foreach c { 1 2 3 4 } { $table insert end [list 1 2 3 4 5] }
You have to redefine the bindings as follows:
# Enforce the activation of the default bindings
tablelist::defineTablelistEdit
# Make sure <Return> will behave like <Tab>
bind TablelistEdit <Return> { tablelist::goToNextPrevCell %W 1 }
--
Csaba Nemethi http://www.nemethi.de mailto:csaba.nemethi@xxxxxxxxxxx
.
- Follow-Ups:
- Re: tablelist: <Return> the same as <Tab> when editing.
- From: Óscar Fuentes
- Re: tablelist: <Return> the same as <Tab> when editing.
- References:
- tablelist: <Return> the same as <Tab> when editing.
- From: Óscar Fuentes
- tablelist: <Return> the same as <Tab> when editing.
- Prev by Date: Re: problem with special characters in file command?
- Next by Date: Re: tablelist: <Return> the same as <Tab> when editing.
- Previous by thread: tablelist: <Return> the same as <Tab> when editing.
- Next by thread: Re: tablelist: <Return> the same as <Tab> when editing.
- Index(es):