Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
StaticBox with children
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
werner  
View profile  
 More options Sep 21 2011, 1:45 pm
From: werner <wbru...@free.fr>
Date: Wed, 21 Sep 2011 19:45:31 +0200
Local: Wed, Sep 21 2011 1:45 pm
Subject: StaticBox with children

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?

Werner

  staticboxtest.py
1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Robin Dunn  
View profile  
 More options Sep 21 2011, 2:28 pm
From: Robin Dunn <ro...@alldunn.com>
Date: Wed, 21 Sep 2011 11:28:26 -0700
Local: Wed, Sep 21 2011 2:28 pm
Subject: Re: [wxPython-users] StaticBox with children
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.

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.

--
Robin Dunn
Software Craftsman
http://wxPython.org


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
werner  
View profile  
 More options Sep 21 2011, 3:09 pm
From: werner <wbru...@free.fr>
Date: Wed, 21 Sep 2011 21:09:40 +0200
Local: Wed, Sep 21 2011 3:09 pm
Subject: Re: [wxPython-users] StaticBox with children

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

  staticboxtest.py
1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
werner  
View profile  
 More options Sep 24 2011, 4:20 am
From: werner <wbru...@free.fr>
Date: Sat, 24 Sep 2011 10:20:24 +0200
Local: Sat, Sep 24 2011 4:20 am
Subject: Re: [wxPython-users] StaticBox with children
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.

Done - Ticket #13510

> 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.

I tried this but then the SB label doesn't show, mentioned it in the
above ticket and provided two different test files.

Werner


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »