Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActionLists and ActionManager

Status
Not open for further replies.

AlienHeadDiscs

Programmer
Aug 25, 2007
1
I am using an Action Manager and Action lists and have associated Actions to a ActionMainMenuBar and to some Category buttons. The problem I am having is that when I try and disable an Action it will show as disabled on the Menu but the Category buttons are still active.
Another issue is when I set the Checked property to true it will add a highlight square around the menu item but will not do the same to the Category buttons. So to work around that I tried changing the glyph to be a check mark to show that it is checked, but what happens is the new glyph is updated on the Category buttons but the Glyph is not updated on the menu items. So no matter what I have tried I can't get them both to be synchronized and that is the main reason for using Actions!
I must not be doing something that needs to be done so if there is anyone with suggestions I would like to hear them. Thanks.
Below is how I am changing the glyph and setting the enabled property.
In an updateControls proc that is called after most UI use cases I have the below code.
actOrderMainHtm is a TAction
...
if not fileExists(AddBackSlash(gBldFolder) + gBldStr + '.htm') then
begin
actOrderMainHtm.Enabled := false;
end; // bldStr.htm file exists

After the button is pressed that executes the Action the below code is ran at the end of the proc
...
actOrderMainHtm.Checked := False;
actOrderMainHtm.ImageIndex := 1; // Default is 0
...
 
1. menuitems have a check mark, buttons dont.
2. from what i can see looking at the actionbar demo, the action imageindex doesnt effect the menubar item only the button.

im not a fan of the action bars, it has a lot of problems.
look at using toolbar2000.



Aaron
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top