Default Sizers, First Draft (was Re: [wxPython-users]

Don Dwiggins ddwiggins at advpubtech.com
Thu Jun 1 15:44:54 PDT 2006


Michael Hipp wrote:
> But... I think taborder ought to be a single property of something. If taborder is a property of every control, then to get a truly custom taborder you end up with a list of calls like this:
> 
>     ctrl1.SetTabPrev(...)
>     ctrl1.SetTabNext(...)
>     ctrl2.SetTabPrev(...)
>     ctrl2.SetTabNext(...)
> 
> On a panel with lots of controls this would start to look amateurish. Much simplier to say:
> 
>    panel.SetTabOrder((ctrl1, ctrl2,))

It'd be easy enough to add this method as a front end to all the 
SetTabXXX calls.  In fact, if you have the ctrlN vars, you don't even 
need to make it a Panel method; maybe something like 
SetTabGroup(sequence-of-controls), with the obvious definition.  Notice 
that this doesn't depend in any way on the containment hierarchy, so 
there's no trouble tabbing across "panel boundaries".

> 
> Or, on the "independent tab groups" train of thought:
> 
>   panel.SetTabOrder(((ctrl1, ctrl2,),(ctrl3, ctrl4)))
> 
> Ug, looks like Lisp :-)

Thatth true 8^)  Just use several SetTabGroup calls.

-- 
Don Dwiggins
Advanced Publishing Technology





More information about the wxpython-users mailing list