[] [] [] CONTROL [] [] []
------clipped at ----|
Using wxFrame->SetToolBar doesnot manifest the same behaviour, but then I lose the docking toolbar.
Code Below
Peter
- Code: Select all
// frame constructor
wxconferenceFrame::wxconferenceFrame(wxWindow* parent, wxWindowID id, const wxString& title,
const wxPoint& pos, const wxSize& size,
long style, const wxString& name)
: wxFrame(parent, id, title, pos, size, style, name)
{
wxImage::AddHandler(new wxPNGHandler);
// set the frame icon
SetIcon(wxICON(conference));
m_mgr.SetFrame(this);
m_mgr.SetFlags(wxAUI_MGR_ALLOW_FLOATING | wxAUI_MGR_TRANSPARENT_HINT);
CreateMenu();
CreateToolbars();
CreateWindows();
}
void wxconferenceFrame::CreateMenu() {
// create menu bars
wxMenu *l_fileMenu = new wxMenu(_(""), wxMENU_TEAROFF);
l_fileMenu->Append(ID_QUIT, _("E&xit\tAlt-X"), _("Quit this program"));
wxMenu *l_aboutMenu = new wxMenu(_(""), wxMENU_TEAROFF);
l_aboutMenu->Append(ID_ABOUT, _("&About...\tCtrl-A"), _("Show conference info"));
// now append the freshly created menu to the menu bar...
wxMenuBar* l_menuBar = new wxMenuBar();
l_menuBar->Append(l_fileMenu, _("&File"));
l_menuBar->Append(l_aboutMenu, _("&Help"));
// ... and attach this menu bar to the frame
SetMenuBar(l_menuBar);
}
void wxconferenceFrame::CreateToolbars() {
// create some toolbars
wxToolBar* tb1 = new wxToolBar(this, -1, wxDefaultPosition, wxDefaultSize, wxTB_FLAT | wxTB_NODIVIDER);
tb1->SetToolBitmapSize(wxSize(24,24));
tb1->AddTool(101, wxT("Help"), wxBitmap(wxImage(_("icons/help.png"))), _("Show Help"));
tb1->AddControl(new wxComboBox(tb1, 1002));
tb1->Realize();
// SetToolBar(tb1);
m_mgr.AddPane(tb1, wxPaneInfo().
Name(wxT("tb1")).Caption(wxT("Big Toolbar")).
ToolbarPane().Top().
LeftDockable(false).RightDockable(false));
}
void wxconferenceFrame::CreateWindows() {
wxTextCtrl* text3 = new wxTextCtrl(this, -1, _("Main content window"),
wxDefaultPosition, wxSize(200,150),
wxNO_BORDER | wxTE_MULTILINE);
wxPaneInfo i;
i.CloseButton(false);
m_mgr.AddPane(text3, wxCENTER);
// tell the manager to "commit" all the changes just made
m_mgr.Update();
}