On 09/21/2011 08:28 PM, Robin Dunn wrote:
> On 9/21/11 10:45 AM, werner wrote:
>> In 2.9 controls within a staticbox can be children of it and no longer
>> need to be siblings.
>> When I do this (see attached) then tab traversal does no longer work -
>> or am I doing something wrong?
> It looks like the static box needs to have the control container code
> added to it so it can handle the tab traversal events. Please create
> a trac ticket about this.
Will do - but see below.
> BTW, you have some other problems in your code. You are adding the
> items that are children of the static box to the panel's sizer. You
> should treat the static box (for layout related things) as if it was
> just another panel. IOW, it should have it's own sizer for managing
> its own children.
> Also the wxStaticBoxSizer probably shouldn't be used in this case.
> Its purpose is to manage the size of the box so it fits around the
> children of the sizer. Since the box should have its own sizer
> assigned to it, and since you can then just add the box directly to
> the parent's sizer, then the wxStaticBoxSizer just becomes excess
> baggage.
If I change it and treat SB like a panel then I tab traversal works, but
the static text box label is not shown.
Assuming that my code is ok this time then I think I should probably
report this one and maybe an error/warning/exception should be thrown if
one keeps using the SB sizer.
Or should I create two different tickets?
Werner