Hi,
I'm trying to convert my application to use wxAUI. As a start, just trying with the toolbar. Stumbled upon the toolbar that contain wxComboBox. Code is as below:
wxToolBar *tBar2 = new wxToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_NODIVIDER | wxTB_FLAT | wxTB_DOCKABLE | wxTB_TEXT);
tBar2->AddControl(new wxStaticText(tBar2, wxID_ANY, wxT(" Database ")));
m_comboBox = new wxComboBox(tBar2, ID_COMBO, wxT(""), wxDefaultPosition, wxSize(200,wxDefaultCoord) );
tBar2->AddControl(m_comboBox);
tBar2->Realize();
m_frameManager.AddPane(tBar2, wxPaneInfo().Name(wxT("Toolbar2")).Caption(wxT("ToolBar")).ToolbarPane() .Top().LeftDockable(false).RightDockable(false)
);
what shown on the toolbar is just first 2 character of the "Database".
Any way around this?
Thank you in advance. Hoping to experience the 'wow' of this great interface.
best regards,
Radzi.
Kirix Support Forums
wxControl on Toolbar - How do I?
4 posts
• Page 1 of 1
- Radzi
- Registered User
- Posts: 1
- Joined: Wed Feb 08, 2006 3:46 am
- Location: Singapore
Re: wxControl on Toolbar - How do I?
Radzi wrote:Hi,
I'm trying to convert my application to use wxAUI. As a start, just trying with the toolbar. Stumbled upon the toolbar that contain wxComboBox. Code is as below:
Whilst it's probably possible to do this using a wxToolbar, I had lots of problems with them. Why not just create a wxPanel containing a wxBoxSizer of the orientation you want, and put your controls in that? Then wxAUI will make sure it docks correctly.
Alex
- abligh
- Registered User
- Posts: 59
- Joined: Sun Jan 01, 2006 2:31 pm
The problem is that the toolbar size measurement gets messed up with controls are added to it. As far as I know, this is wxToolBar's fault.
I, too, recommend that you try out a panel. We are working on a different toolbar solution internally. Maybe it will appear in one of the upcoming versions.
I, too, recommend that you try out a panel. We are working on a different toolbar solution internally. Maybe it will appear in one of the upcoming versions.
-
Ben - Kirix Support Team
- Posts: 525
- Joined: Mon Dec 19, 2005 6:29 am
Re: wxControl on Toolbar - How do I?
I can't add wxFrame to Toolbar.
- EhLtUd
- Registered User
- Posts: 4
- Joined: Fri Sep 11, 2009 3:24 am
4 posts
· Page 1 of 1
Return to wxAUI Questions, Thoughts & Feedback