> -----Original Message-----
> From: Stef Pillaert [mailto:[EMAIL PROTECTED]]
> 
> I have a few entries in a window, and I'm trying to switch focus (in a
> certain order) between them by binding the <Key-Tab> to each of them.
> I bind <Key-Tab> to one of the entries (in the 
> bindings-window) with the
> following commands:
> 
> focus .top45.ent57
> puts "He did it!"
> 
> When I hit the tab key, I see "He did it!", but he didn't do 
> it: he switched to
> another widget (the same as if I didn't make any binding at 
> all) So it seems
> that the original order is followed, instead of the one I'm 
> trying to impose...
> 
> What am I doing wrong?

The only thing you did wrong was not reading the [bind] man page. :-)

Check the section on "Multiple Matches", and you'll see how to handle this.
Basically, you want to put a [break] into your widget binding to prevent the
class binding (applied to all Entries) and the "all" binding (applied to all
widgets).

Or, if you really just want to control the tab-order (and not do other
processing), you should be looking at tk_focusNext man page, which explains
that you can control tab order by controlling the stacking order, and
individual widgets can be controlled with the -takefocus option.

Good luck,
Bob
-- 
Bob Techentin                                  [EMAIL PROTECTED] 
Mayo Foundation                                           (507) 284-2702
Rochester MN, 55905 USA   http://www.mayo.edu/sppdg/sppdg_home_page.html

_______________________________________________
vtcl-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/vtcl-user

Reply via email to