Board index » cppbuilder » Tool bar menu & MDI
Matthew Ferreir
![]() CBuilder Developer |
Wed, 08 Oct 2003 08:27:52 GMT
|
Matthew Ferreir
![]() CBuilder Developer |
Wed, 08 Oct 2003 08:27:52 GMT
Tool bar menu & MDI
I have a menu that is created as tool bar buttons, exactly like the IDE. The
problem is that my app is an MDI app, so without the menu bar created when assigning a menu to the form, a maximized child window does not display the close/min/restore buttons. Is there something I can do to show these buttons somewhere (like in Word), or do I have to ditch the tool bar menu and assign the menu to the form? -- |
Team
![]() CBuilder Developer |
Fri, 10 Oct 2003 01:05:37 GMT
Re:Tool bar menu & MDIHi Matthew, [snip] Quote> ...a maximized child window does not display the bar buttons won't appear. If you notice though, programs like Word render their own title bar buttons for maximized child windows. You too can do the same. Just use a triplet of TSpeedButtons on a Panel, like so (cut and paste the following onto your Form designer)... object MainPanel: TPanel Now place your ToolBar menu onto this main Panel; make sure your // // Quote} { if (ActiveMDIChild) { ActiveMDIChild->WindowState = wsNormal; ShowTitleButtons(false); } Quote} { if (ActiveMDIChild) { ActiveMDIChild->WindowState = wsMinimized; ShowTitleButtons(false); } Quote} { ButtonsPanel->Visible = show; Quote} // in MDIChild source... // // OnResize event handler... void __fastcall TMDIChild::FormResize(TObject *Sender) { MainForm->ShowTitleButtons(WindowState == wsMaximized); Quote} -- Damon Chandler (TeamB) - BCBCAQ <http://bcbcaq.freeservers.com> - Graphics API Black Book <http://graphicsBB.itgo.com> |
1. Menu Bar/Tool Bar/Cool Bar help/guidance
2. ANNOUNCE: Auto Bar (Menu and Tool Bars in MS Office 97 style) + DBNavigator ToolBar
3. Linking MDI child and main form tool bars?
4. OleControl, after resize of MDI parent window tool bar disapperas
5. MDI / client area / tool bar
6. MDI / client area / tool bar