[ wxwindows-Bugs-1642148 ] wxBoxSizer don't update size in Layout()
SourceForge.net
noreply at sourceforge.net
Mon Jan 22 20:30:09 PST 2007
Bugs item #1642148, was opened at 2007-01-23 06:30
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1642148&group_id=9863
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: OlegTs (olegts)
Assigned to: Nobody/Anonymous (nobody)
Summary: wxBoxSizer don't update size in Layout()
Initial Comment:
[wxMSW 2.8.0, WinXP, VS8.0]
Hi!
I have vertical box sizer, aligned right. It contains wxStaticText and wxStaticLine(horizontal). All with proportion == 0. Static text is aligned to right. Static line was added with wxEXPAND flag.
First static text contains text "+++++++++++" and static line is expanded beyound this text and have width same as text.
However when I change text to "-" and after call Layout() static line remains with old size.
The resone of this is that RecalcSizes() don't take into account size, that was calculated in CalcMin(), but uses m_size for items with wxEXPAND, wxSHAPED flags.
It is better to use in RecalcSizes():
//================================================================
wxPoint child_pos( pt );
wxSize child_size( size.x, height );
if (item->GetFlag() & (wxEXPAND | wxSHAPED))
child_size.x = m_size.x;
//================================================================
This:
//================================================================
wxPoint child_pos( pt );
wxSize child_size( size.x, height );
if (item->GetFlag() & (wxEXPAND | wxSHAPED))
child_size.x = m_minWidth;
//================================================================
But I am not sure of this.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1642148&group_id=9863
More information about the wx-dev
mailing list