made wxPanel be auto layout aware
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4075 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -36,6 +36,7 @@ BEGIN_EVENT_TABLE(wxPanel, wxWindow)
|
||||
EVT_SYS_COLOUR_CHANGED(wxPanel::OnSysColourChanged)
|
||||
EVT_SET_FOCUS(wxPanel::OnFocus)
|
||||
EVT_NAVIGATION_KEY(wxPanel::OnNavigationKey)
|
||||
EVT_SIZE(wxPanel::OnSize)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
#endif
|
||||
@@ -101,7 +102,7 @@ void wxPanel::OnNavigationKey( wxNavigationKeyEvent& event )
|
||||
wxWindow *winFocus = event.GetCurrentFocus();
|
||||
if (!winFocus)
|
||||
winFocus = wxWindow::FindFocus();
|
||||
|
||||
|
||||
if (!winFocus)
|
||||
{
|
||||
event.Skip();
|
||||
@@ -132,7 +133,7 @@ void wxPanel::OnNavigationKey( wxNavigationKeyEvent& event )
|
||||
// we don't want to tab into a different dialog or frame
|
||||
if ( focussed_child_of_p->IsTopLevel() )
|
||||
break;
|
||||
|
||||
|
||||
if ( wxDynamicCast(p, wxPanel) )
|
||||
{
|
||||
event.SetCurrentFocus( focussed_child_of_p );
|
||||
@@ -166,6 +167,14 @@ void wxPanel::OnNavigationKey( wxNavigationKeyEvent& event )
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
void wxPanel::OnSize(wxSizeEvent& WXUNUSED(event))
|
||||
{
|
||||
#if wxUSE_CONSTRAINTS
|
||||
if (GetAutoLayout()) Layout();
|
||||
#endif
|
||||
}
|
||||
|
||||
void wxPanel::OnFocus(wxFocusEvent& event)
|
||||
{
|
||||
if ( m_winLastFocused )
|
||||
|
Reference in New Issue
Block a user