On Mon, 11 Dec 2000, Mark Swarbrick wrote:
You have to put it as a proc in your application, and run it after
you create the window that has the widgets in it.
For example, if the window is the main toplevel, you would call it from
the vTcl-supplied "main" proc. If it's some other toplevel, then you would
do:
Window show $widget(myOtherToplevel)
set_text_traversal {list of widgets for your other toplevel}
I don't think running the proc more than once would any harm.
It's gross, but that's all I could offer!
> So to use this script....
> I make a list called tlist and order the list of widgets in tlist to be the tab
> order that I want? And then I run this script - but do I just run it once, or
> do I put this code inside my program and call this process everytime my program
> runs?
>
> On Mon, 11 Dec 2000, Rick Macdonald wrote:
> > On Mon, 11 Dec 2000, Mark Swarbrick wrote:
> >
> > > Yes, I am using the place command. I'm building this with Visual Tcl and the
> > > place command is what it is using, so I guess what you say doesn't apply...?
> > > So I'm back where I started - I've got a nice gui all built but tabbing to the
> > > entry boxes is really messed up. Surely there is an easy way to change this.
> > > Sure hope someone can help me.
> > >
> > > ...Mark
> > >
> > > On Sat, 02 Dec 2000, Rick Macdonald wrote:
> >
> > > > Ah, if you are using the "place" geometry manager in vTcl, probably none
> > > > of the vTcl instructions above apply...
> >
> > Well, I've never used the place command, so I don't know how to fix it
> > within vTcl. Hopefully someone who does is listening!
> >
> > If you're really desperate, here is a function from TkGnats that, given a
> > list of widgets, sets the tab traversal order to the order of the list:
> >
> > proc set_text_traversal {tlist} {
> > set ll [llength $tlist]
> > if {$ll < 2} {
> > return
> > }
> > for {set x 1} {$x<$ll} {incr x} {
> > set w [lindex $tlist $x]
> > set prevw [lindex $tlist [expr $x-1]]
> > bind $prevw <Tab> "focus $w
> > break"
> > bind $prevw <Control-n> "focus $w"
> > }
> > bind [lindex $tlist [expr $ll-1]] <Tab> "focus [lindex $tlist 0]
> > break"
> > bind [lindex $tlist [expr $ll-1]] <Control-n> "focus [lindex $tlist
> > 0]"
> >
> > bind [lindex $tlist 0] <Shift-Tab> "focus [lindex $tlist [expr $ll-1]]
> > break"
> > bind [lindex $tlist 0] <Control-p> "focus [lindex $tlist [expr
> > $ll-1]]"
> > for {set x 0} {$x < [expr $ll-1]} {incr x} {
> > set w [lindex $tlist $x]
> > set nextw [lindex $tlist [expr $x+1]]
> > bind $nextw <Shift-Tab> "focus $w
> > break"
> > bind $nextw <Control-p> "focus $w"
> > }
> > }
> >
> > ...RickM...
>
...RickM...
_______________________________________________
vtcl-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/vtcl-user