[ wxwindows-Bugs-1730157 ] wxWindow::DoSetSize() not documented
SourceForge.net
noreply at sourceforge.net
Sun Jun 3 02:35:23 PDT 2007
Bugs item #1730157, was opened at 2007-06-03 10:26
Message generated for change (Comment added) made by giles314
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1730157&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: Documentation
Group: Must fix
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Giles (giles314)
Assigned to: Nobody/Anonymous (nobody)
Summary: wxWindow::DoSetSize() not documented
Initial Comment:
You need to redefine the virtual wxWindow::DoSetSize() when you are creating a custom control that is to be managed by a sizer. But it is not described in the documentation.
----------------------------------------------------------------------
>Comment By: Giles (giles314)
Date: 2007-06-03 11:35
Message:
Logged In: YES
user_id=1675490
Originator: YES
I was overloading SetSize as described by the documentation and when the
sizer tries to place the object this function is not called. So my control
perform the resizing as defined by its subclass instead of doing the
customized resizing. The sizer calls DoSetSize. So I realize you need not
overload SetSize and instead overload DoSetSize to have a custom resizing.
I got a confirmation of my hypothesis in wx/windows.h. Below an extract of
this file:
// this is the virtual function to be overriden in any derived class
which
// wants to change how SetSize() or Move() works - it is called by
all
// versions of these functions in the base class
virtual void DoSetSize(int x, int y,
int width, int height,
int sizeFlags = wxSIZE_AUTO) = 0;
----------------------------------------------------------------------
Comment By: Robert Roebling (roebling)
Date: 2007-06-03 10:45
Message:
Logged In: YES
user_id=77100
Originator: NO
There is no need to redefine wxWindow::DoSetSize(). What makes you think
it is?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1730157&group_id=9863
More information about the wx-dev
mailing list