1. corrected client data deletion in wxListBox (no more memory leaks in controls

sample)
2. added wxST_NO_AUTORESIZE style for wxGTK and wxMSW and added test for it to
   the controls sample


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-10-24 16:29:08 +00:00
parent e6ebb51430
commit 185fa6bf6f
6 changed files with 62 additions and 42 deletions

View File

@@ -129,10 +129,12 @@ void wxStaticText::SetLabel(const wxString& label)
{
SetWindowText(GetHwnd(), label);
// adjust the size of the window to fit to the label (this behaviour is
// backward compatible and generally makes sense but we might want to still
// provide the user a way to disable it) (VZ)
DoSetSize(-1, -1, -1, -1, wxSIZE_AUTO_WIDTH | wxSIZE_AUTO_HEIGHT);
// adjust the size of the window to fit to the label unless autoresizing is
// disabled
if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
{
DoSetSize(-1, -1, -1, -1, wxSIZE_AUTO_WIDTH | wxSIZE_AUTO_HEIGHT);
}
}
WXHBRUSH wxStaticText::OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,