Yes and No<g>. Yes, provided you maintain the menu yourself. No, if
you want it done automatically for you.
Good luck.
Kurt
Thank you for clarifying this.
Could anyone clarify what the purpose and possible function of the property
"WindowMenu" in a TActionMainMenuBar is? The source (ActnMenu.pas) seems to
indicate a function related to MDI, but I see no further description or
effect of assigning a value to the property.
> Could anyone clarify what the purpose and possible function of the
property
> "WindowMenu" in a TActionMainMenuBar is? The source (ActnMenu.pas)
seems to
> indicate a function related to MDI, but I see no further description
or
> effect of assigning a value to the property.
Exactly that of TMainMenu.WindowMenu; support for MDI child windows in a
MDI application.
Ken
---
Ken White
kwh...@adpsi.com
Clipper Functions for Delphi and C++ Builder
http://www.adpsi.com
But how?
I have an ActionManager with an ActionMainMenuBar that contain a (standard)
Window-menu (action-class). Setting the property
ActionMainMenuBar.WindowMenu = 'Window' does not give the expected
behaviour....
Ken (or anyone), could you be more specific (online Help has next to
nothing...) ?
> But how?
> I have an ActionManager with an ActionMainMenuBar that contain a
(standard)
> Window-menu (action-class). Setting the property
> ActionMainMenuBar.WindowMenu = 'Window' does not give the expected
> behaviour....
>
> Ken (or anyone), could you be more specific (online Help has next to
> nothing...) ?
Ok. First things first. This *is* a MDI app we're discussing, right?
(The form that the ActionMainMenuBar is on is of FormStyle fsMDIForm.)
Secondly, have you gotten the latest Action* updates from Steve
Trefethan's site (http://www.geocities.com/delphihelp)? There was a fix
related to MDI menus in there somewhere.
Ok. If the answers to both questions above are 'Yes', we're ready to go.
<g>
You need to create at least one item on your ActionMainMenuBar 'Window'
menu. There has to be *at least* one sub-item. With MDI apps, you
usually want at least two (Tile and Cascade). It's also usually
customary to add a separator as the last item. (The 'at least one
sub-item' should be documented in the Delphi help, IMO - it's a common
problem.)
Now set your 'WindowMenu' property on the main (MDI parent) form to the
above 'Window' menu item.
You should be set to go. Running your app and creating a MDI child
window should automagically add it to the Window menu of the parent
window, and closing a child window should automatically remove it.
HTH,
All the above was already done (but it is NOT the WindowMenu-property on the
MDI MainForm that is in play).
But this was the error: In the ActionMainMenuBar, the propety WindowMenu
should be the caption of the menuitem.
I had WindowMenu = 'Window' (as this was how the caption appeared on the
menu bar). But the caption was in fact '&Window' !
With WindowMenu '&Window' all is (of course) fine.
Thank you Ken for making me look a bit closer ....