Posted on 2008-11-20 04:04
chefZ 阅读(348)
评论(0) 编辑 收藏 引用
Step 1. in mainframe ctor
this->SetWindowStyleFlag(this->GetWindowStyleFlag() & ~wxTAB_TRAVERSAL);
m_AuiManager.SetManagedWindow(this); //attach application main frame to AuiManager
m_AuiManager.SetFlags(m_AuiManager.GetFlags() | wxAUI_MGR_ALLOW_ACTIVE_PANE | wxAUI_MGR_RECTANGLE_HINT); //assign AuiManager style
m_AuiManager.GetArtProvider()->SetMetric(wxAUI_DOCKART_GRADIENT_TYPE, wxAUI_GRADIENT_HORIZONTAL); //setup arts for AuiManager
...
Step 2. after create controls (can be any)
...
m_AuiManager.AddPane(xxx, wxAuiPaneInfo().
Name(wxT("xxx")).
Caption(_("xxx")).
xxxPane().Top().LeftDockable(false).RightDockable(false));
...
m_AuiManager.SetDockSizeConstraint(0.75, 0.75);
m_AuiManger.Update()
Note: add tooltips to toolbar items
example:
WxToolBar1->AddTool(idname, _T("idname"), m_ImageList->GetBitmap(idname_xpm_idx), _("tooltips text"), wxITEM_NORMAL);