git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57522
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
ID_NotebookArtSimple,
ID_NotebookAlignTop,
ID_NotebookAlignBottom,
ID_NotebookArtSimple,
ID_NotebookAlignTop,
ID_NotebookAlignBottom,
ID_FirstPerspective = ID_CreatePerspective+1000
};
ID_FirstPerspective = ID_CreatePerspective+1000
};
// prepare a few custom overflow elements for the toolbars' overflow buttons
// prepare a few custom overflow elements for the toolbars' overflow buttons
wxAuiToolBarItemArray prepend_items;
wxAuiToolBarItemArray append_items;
wxAuiToolBarItem item;
wxAuiToolBarItemArray prepend_items;
wxAuiToolBarItemArray append_items;
wxAuiToolBarItem item;
wxAuiToolBar* tb4 = new wxAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
wxAuiToolBar* tb4 = new wxAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
- wxAUI_TB_DEFAULT_STYLE |
+ wxAUI_TB_DEFAULT_STYLE |
wxAUI_TB_OVERFLOW |
wxAUI_TB_TEXT |
wxAUI_TB_HORZ_TEXT);
wxAUI_TB_OVERFLOW |
wxAUI_TB_TEXT |
wxAUI_TB_HORZ_TEXT);
if (evt.IsDropDownClicked())
{
wxAuiToolBar* tb = static_cast<wxAuiToolBar*>(evt.GetEventObject());
if (evt.IsDropDownClicked())
{
wxAuiToolBar* tb = static_cast<wxAuiToolBar*>(evt.GetEventObject());
tb->SetToolSticky(evt.GetId(), true);
tb->SetToolSticky(evt.GetId(), true);
// create the popup menu
wxMenu menuPopup;
// create the popup menu
wxMenu menuPopup;
wxBitmap bmp = wxArtProvider::GetBitmap(wxART_QUESTION, wxART_OTHER, wxSize(16,16));
wxBitmap bmp = wxArtProvider::GetBitmap(wxART_QUESTION, wxART_OTHER, wxSize(16,16));
wxMenuItem* m1 = new wxMenuItem(&menuPopup, 10001, _("Drop Down Item 1"));
m1->SetBitmap(bmp);
menuPopup.Append(m1);
wxMenuItem* m1 = new wxMenuItem(&menuPopup, 10001, _("Drop Down Item 1"));
m1->SetBitmap(bmp);
menuPopup.Append(m1);
wxMenuItem* m2 = new wxMenuItem(&menuPopup, 10002, _("Drop Down Item 2"));
m2->SetBitmap(bmp);
menuPopup.Append(m2);
wxMenuItem* m2 = new wxMenuItem(&menuPopup, 10002, _("Drop Down Item 2"));
m2->SetBitmap(bmp);
menuPopup.Append(m2);
wxMenuItem* m3 = new wxMenuItem(&menuPopup, 10003, _("Drop Down Item 3"));
m3->SetBitmap(bmp);
menuPopup.Append(m3);
wxMenuItem* m3 = new wxMenuItem(&menuPopup, 10003, _("Drop Down Item 3"));
m3->SetBitmap(bmp);
menuPopup.Append(m3);
wxMenuItem* m4 = new wxMenuItem(&menuPopup, 10004, _("Drop Down Item 4"));
m4->SetBitmap(bmp);
menuPopup.Append(m4);
wxMenuItem* m4 = new wxMenuItem(&menuPopup, 10004, _("Drop Down Item 4"));
m4->SetBitmap(bmp);
menuPopup.Append(m4);
// line up our menu with the button
wxRect rect = tb->GetToolRect(evt.GetId());
wxPoint pt = tb->ClientToScreen(rect.GetBottomLeft());
pt = ScreenToClient(pt);
// line up our menu with the button
wxRect rect = tb->GetToolRect(evt.GetId());
wxPoint pt = tb->ClientToScreen(rect.GetBottomLeft());
pt = ScreenToClient(pt);
PopupMenu(&menuPopup, pt);
PopupMenu(&menuPopup, pt);
wxPanel *panel = new wxPanel( ctrl, wxID_ANY );
wxFlexGridSizer *flex = new wxFlexGridSizer( 2 );
wxPanel *panel = new wxPanel( ctrl, wxID_ANY );
wxFlexGridSizer *flex = new wxFlexGridSizer( 2 );
- flex->AddGrowableRow( 0 );
- flex->AddGrowableRow( 3 );
- flex->AddGrowableCol( 1 );
flex->Add( 5,5 ); flex->Add( 5,5 );
flex->Add( new wxStaticText( panel, -1, wxT("wxTextCtrl:") ), 0, wxALL|wxALIGN_CENTRE, 5 );
flex->Add( new wxTextCtrl( panel, -1, wxT(""), wxDefaultPosition, wxSize(100,-1)),
flex->Add( 5,5 ); flex->Add( 5,5 );
flex->Add( new wxStaticText( panel, -1, wxT("wxTextCtrl:") ), 0, wxALL|wxALIGN_CENTRE, 5 );
flex->Add( new wxTextCtrl( panel, -1, wxT(""), wxDefaultPosition, wxSize(100,-1)),
flex->Add( new wxSpinCtrl( panel, -1, wxT("5"), wxDefaultPosition, wxSize(100,-1),
wxSP_ARROW_KEYS, 5, 50, 5 ), 0, wxALL|wxALIGN_CENTRE, 5 );
flex->Add( 5,5 ); flex->Add( 5,5 );
flex->Add( new wxSpinCtrl( panel, -1, wxT("5"), wxDefaultPosition, wxSize(100,-1),
wxSP_ARROW_KEYS, 5, 50, 5 ), 0, wxALL|wxALIGN_CENTRE, 5 );
flex->Add( 5,5 ); flex->Add( 5,5 );
+ flex->AddGrowableRow( 0 );
+ flex->AddGrowableRow( 3 );
+ flex->AddGrowableCol( 1 );
panel->SetSizer( flex );
ctrl->AddPage( panel, wxT("wxPanel"), false, page_bmp );
panel->SetSizer( flex );
ctrl->AddPage( panel, wxT("wxPanel"), false, page_bmp );