void MyFrame::OnTabAlignment(wxCommandEvent &evt)
{
- size_t i, count;
+ size_t i, count;
wxAuiPaneInfoArray& all_panes = m_mgr.GetAllPanes();
for (i = 0, count = all_panes.GetCount(); i < count; ++i)
{
{
wxAuiNotebook* nb = (wxAuiNotebook*)pane.window;
+ long style = nb->GetWindowStyleFlag();
+ style &= ~(wxAUI_NB_TOP | wxAUI_NB_BOTTOM);
if (evt.GetId() == ID_NotebookAlignTop)
- nb->SetWindowStyleFlag(nb->GetWindowStyleFlag()^wxAUI_NB_BOTTOM|wxAUI_NB_TOP);
- else if (evt.GetId() == ID_NotebookAlignBottom)
- nb->SetWindowStyleFlag(nb->GetWindowStyleFlag()^wxAUI_NB_TOP|wxAUI_NB_BOTTOM);
+ style |= wxAUI_NB_TOP;
+ else if (evt.GetId() == ID_NotebookAlignBottom)
+ style |= wxAUI_NB_BOTTOM;
+ nb->SetWindowStyleFlag(style);
+
nb->Refresh();
}
}
wxPoint(client_size.x, client_size.y),
wxSize(430,200),
m_notebook_style);
+ ctrl->Freeze();
wxBitmap page_bmp = wxArtProvider::GetBitmap(wxART_NORMAL_FILE, wxART_OTHER, wxSize(16,16));
ctrl->AddPage(CreateHTMLCtrl(ctrl), wxT("Welcome to wxAUI") , false, page_bmp);
wxPanel *panel = new wxPanel( ctrl, wxID_ANY );
- wxFlexGridSizer *flex = new wxFlexGridSizer( 2 );
+ wxFlexGridSizer *flex = new wxFlexGridSizer( 4, 2, 0, 0 );
flex->AddGrowableRow( 0 );
flex->AddGrowableRow( 3 );
flex->AddGrowableCol( 1 );
ctrl->AddPage( new wxTextCtrl( ctrl, wxID_ANY, wxT("Some more text"),
wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxNO_BORDER) , wxT("wxTextCtrl 8") );
+ ctrl->Thaw();
return ctrl;
}