#14698: Empty wxStaticBoxSizers aren't properly displayed

7 views
Skip to first unread message

wxTrac

unread,
Sep 26, 2012, 4:39:16 AM9/26/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/14698>

#14698: Empty wxStaticBoxSizers aren't properly displayed
--------------------------------------------+-------------------------------
Reporter: dghart | Owner:
Type: defect | Status: new
Priority: normal | Milestone: 2.9.5
Component: GUI-all | Version: 2.9-svn
Keywords: empty wxStaticBoxSizer display | Blockedby:
Patch: 0 | Blocking:
--------------------------------------------+-------------------------------
The wxStaticBox of an empty wxStaticBoxSizer is displayed at the top-left
of its parent container. This can most easily be seen in the 'controls
section of the xrcdemo, but the attached patch to 'minimal' also
demonstrates the issue. Adding a child to the sizer makes the display
normal.

This bisects to r65079 "Don't show empty sizers" and, as suggested, the
wxRESERVE_SPACE_EVEN_IF_HIDDEN flag fixes the issue. However I wonder if
wxStaticBoxSizer should be an exception to the "Don't show" rule.

Even if not, the xrcdemo should be fixed, presumably with
wxRESERVE_SPACE_EVEN_IF_HIDDEN. I'll attach before/after screenshots of
it.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/14698>

wxTrac

unread,
Sep 26, 2012, 8:08:48 AM9/26/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/14698#comment:1>

#14698: Empty wxStaticBoxSizers aren't properly displayed
--------------------------------------------+-------------------------------
Reporter: dghart | Owner:
Type: defect | Status: confirmed
Priority: low | Milestone: 3.0
Component: GUI-all | Version: 2.9-svn
Keywords: empty wxStaticBoxSizer display | Blockedby:
Patch: 0 | Blocking:
--------------------------------------------+-------------------------------
Changes (by vadz):

* cc: juliansmart (added)
* priority: normal => low
* status: new => confirmed
* milestone: 2.9.5 => 3.0


Comment:

Thanks for the report, I do see the bug and agree that something needs to
be done about it. AFAICS we have 2 choices:

1. Don't show empty `wxStaticBoxSizer`s at all, i.e. not even the box.
2. Ensure that `IsShown()` returns true for `wxStaticBoxSizer` even if
they don't have any children.

I think (2) makes more sense because they're still visible, after all, and
hiding the box would probably be unexpected.

Julian, would this affect DialogBlocks in any way? Do you have any
preferences here?


--
Ticket URL: <http://trac.wxwidgets.org/ticket/14698#comment:1>

wxTrac

unread,
Mar 27, 2013, 7:10:17 PM3/27/13
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/14698#comment:2>

#14698: Empty wxStaticBoxSizers aren't properly displayed
----------------------+-----------------------------------------------------
Reporter: dghart | Owner:
Type: defect | Status: closed
Priority: low | Milestone: 3.0
Component: GUI-all | Version: 2.9-svn
Resolution: fixed | Keywords: empty wxStaticBoxSizer display
Blockedby: | Patch: 0
Blocking: |
----------------------+-----------------------------------------------------
Changes (by VZ):

* status: confirmed => closed
* resolution: => fixed


Comment:

(In [73729]) Fix display of empty wxStaticBoxSizers.

wxStaticBoxSizer should be considered shown if its static box is shown,
even
if it has no elements (or all of them are hidden).

Closes #14698.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/14698#comment:2>
Reply all
Reply to author
Forward
0 new messages