Re: TMainMenu
- From: "Chris Morgan" <chris.nospam at lynxinfo dot co dot uk>
- Date: Mon, 31 Dec 2007 19:08:12 -0000
Seriously, if you know something I don't, I'd be glad to hear it. For
example, if I want to add some menu items to a menu named "miView".
Developing with TMainMenu I can just use miView.Add() and "viola" (a well
known technique used by magicians) the new menu item is there for use.
Developing with actions, the only way I could find is using the index
starting at the TActionManager. There was a find item method, but it
worked via the caption. I think I can have duplicate captions, so which
item would be found?
Use the TAction skinning.
Once you have added the framework to your form, you never
need to worry about it again. You can continue using the
TMenuItem vars as before, move them around, show/hide them etc,
and the action menubar will display the current state of the
TMainMenu, since the actions for each submenu are updated
when each menu is opened/clicked.
It does actually work... honest!
Cheers,
Chris
.
- References:
- TMainMenu
- From: Rich
- Re: TMainMenu
- From: Chris Morgan
- Re: TMainMenu
- From: Rich
- Re: TMainMenu
- From: Rich
- TMainMenu
- Prev by Date: Re: Seeking Simple TCP component for Delphi/FPC/Kylix
- Next by Date: Re: Cool things you can do with Delphi
- Previous by thread: Re: TMainMenu
- Next by thread: Re: TMainMenu
- Index(es):