BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Stymied by TActionMainMenuBar

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Using
View previous topic :: View next topic  
Author Message
Bill McMahon
Guest





PostPosted: Tue Sep 07, 2004 11:32 pm    Post subject: Stymied by TActionMainMenuBar Reply with quote



In my app I'm dynamically adding categories to the main menu bar, one
for each site. Each site controls HW therefore I want same menu items
for each site, The dynamic creation works fine, however during the
Execution & Update events, I've not figured out how to determine the
top most menu item, either by caption or tag. I need this info to
access site commands/state. I've tried typecasting to every
possibility that I can think of.
Any help greatly appreciated
Bill

var
i: integer;
Name: string;
SiteMenu: TActionClientItem;
SitesMenu: TActionClient;
SiteHost: TVirtualSite;
begin

SitesMenu := ActionMainMenuBar.FindFirst;
for i := 0 to MaxSites - 1 do
begin
Name := Configuration.ReadString('Site' + IntToStr(i), 'Name',
'Site ' + IntToStr(i));

if SitesMenu <> nil then
begin
SiteMenu := ActionManager.AddCategory('SiteActions', SitesMenu,
False);
SiteMenu.Caption := Name;
SiteMenu.Tag := i;
end;
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Using All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.