Unified flags for orienting wxBookCtrls (with backward compatibility). Centralised code for sizing internals.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35972 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2005-10-21 19:03:06 +00:00
parent d8fd7acb8b
commit 2ddb4d1358
14 changed files with 291 additions and 450 deletions

View File

@@ -355,19 +355,19 @@ void NotebookWidgetsPage::CreateNotebook()
// fall through
case Orient_Top:
flags = wxNB_TOP;
flags = wxBK_TOP;
break;
case Orient_Bottom:
flags = wxNB_BOTTOM;
flags = wxBK_BOTTOM;
break;
case Orient_Left:
flags = wxNB_LEFT;
flags = wxBK_LEFT;
break;
case Orient_Right:
flags = wxNB_RIGHT;
flags = wxBK_RIGHT;
break;
}
@@ -506,7 +506,7 @@ void NotebookWidgetsPage::OnUpdateUIRemoveButton(wxUpdateUIEvent& event)
void NotebookWidgetsPage::OnUpdateUIResetButton(wxUpdateUIEvent& event)
{
event.Enable( !m_chkImages->GetValue() ||
m_radioOrient->GetSelection() != wxNB_TOP );
m_radioOrient->GetSelection() != wxBK_TOP );
}
void NotebookWidgetsPage::OnUpdateUINumPagesText(wxUpdateUIEvent& event)

View File

@@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
// Program: wxWidgets Widgets Sample
// Name: widgets.cpp
// Name: samples/widgets/widgets.cpp
// Purpose: Sample showing most of the simple wxWidgets widgets
// Author: Vadim Zeitlin
// Created: 27.03.01
@@ -322,13 +322,13 @@ WidgetsFrame::WidgetsFrame(const wxString& title)
// we have 2 panes: book with pages demonstrating the controls in the
// upper one and the log window with some buttons in the lower
int style = wxNO_FULL_REPAINT_ON_RESIZE|wxCLIP_CHILDREN|wxBC_DEFAULT;
int style = wxNO_FULL_REPAINT_ON_RESIZE|wxCLIP_CHILDREN|wxBK_DEFAULT;
// Uncomment to suppress page theme (draw in solid colour)
//style |= wxNB_NOPAGETHEME;
m_book = new wxBookCtrl(m_panel, wxID_ANY, wxDefaultPosition,
#ifdef __WXMOTIF__
wxSize(500, -1), // under Motif, height is a function of the width...
wxSize(500, wxDefaultCoord), // under Motif, height is a function of the width...
#else
wxDefaultSize,
#endif
@@ -698,4 +698,3 @@ wxCheckBox *WidgetsPage::CreateCheckBoxAndAddToSizer(wxSizer *sizer,
return checkbox;
}