Allow using sizers for laying out wxMDIClientWindow in wxMSW.
Let the user code put wxMDIParentFrame::GetClientWindow() into a sizer and manage it as any other window, instead of having to do it manually. Closes #16196. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -69,6 +69,7 @@ wxMSW:
|
|||||||
- Add support for saving 256*256 32bpp ICOs in PNG format (Artur Wieczorek).
|
- Add support for saving 256*256 32bpp ICOs in PNG format (Artur Wieczorek).
|
||||||
- Keep menu item icon after removing and adding it back (Artur Wieczorek).
|
- Keep menu item icon after removing and adding it back (Artur Wieczorek).
|
||||||
- Add wxThread::MSWGetHandle() (troelsk).
|
- Add wxThread::MSWGetHandle() (troelsk).
|
||||||
|
- Allow using sizers for laying out wxMDIClientWindow (Artur Wieczorek).
|
||||||
|
|
||||||
wxOSX/Cocoa:
|
wxOSX/Cocoa:
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
#include "wx/settings.h"
|
#include "wx/settings.h"
|
||||||
#include "wx/intl.h"
|
#include "wx/intl.h"
|
||||||
#include "wx/log.h"
|
#include "wx/log.h"
|
||||||
|
#include "wx/sizer.h"
|
||||||
#include "wx/toolbar.h"
|
#include "wx/toolbar.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -466,12 +467,17 @@ WXHMENU wxMDIParentFrame::MSWGetActiveMenu() const
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
void wxMDIParentFrame::UpdateClientSize()
|
void wxMDIParentFrame::UpdateClientSize()
|
||||||
{
|
|
||||||
if ( GetClientWindow() )
|
|
||||||
{
|
{
|
||||||
int width, height;
|
int width, height;
|
||||||
GetClientSize(&width, &height);
|
GetClientSize(&width, &height);
|
||||||
|
|
||||||
|
if ( wxSizer* sizer = GetSizer() )
|
||||||
|
{
|
||||||
|
sizer->SetDimension(0, 0, width, height);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( GetClientWindow() )
|
||||||
GetClientWindow()->SetSize(0, 0, width, height);
|
GetClientWindow()->SetSize(0, 0, width, height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user