EnableActions() problem |
Post Reply |
Author | |
MadRiver
Groupie Joined: 21 August 2008 Location: United States Status: Offline Points: 22 |
Post Options
Thanks(0)
Posted: 06 November 2008 at 1:44pm |
Hello,
Immediately after creating the CommandBars object I call EnableActions. I add several Actions, and several menu items referencing the actions. However, when I disable an action the menu item referencing that action is still enabled. Nothing happens when the user clicks on the menu item, as expected, since the Action is disabled. Are thee other steps I have to take to update the Enabled state of all controls that refer to an Action (when the state of the Action changes)? Thanks for advice... |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Have work automatically.
Check our Actions sample. All you need is to create actions before menu items.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
MadRiver
Groupie Joined: 21 August 2008 Location: United States Status: Offline Points: 22 |
Post Options
Thanks(0)
|
This is very alarming. Are you saying that all actions must be created before menu items/toolbar controls? That after actions are created and menu items reference them, no more actions can be added? If so, this is a dreadful limitation. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
I don't say this.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
MadRiver
Groupie Joined: 21 August 2008 Location: United States Status: Offline Points: 22 |
Post Options
Thanks(0)
|
I believe I am taking the same steps the ActionsSample program is taking:
-- Call EnableActions after creating the CommandBars control, before creating any Actions or controls. -- Add an Action -- Add a menu item referring to the Action As far as I can tell, the only difference between the ActionsSample and my code is that the ActionsSample creates all the Actions before creating any menu items. My code creates an Action, then the menu item referring to the Action; creates an Action, then a menu item; etc. |
|
Xtreme CommandBars ActiveX v 12.1.0
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Lets continue in issuetrack. It have to be something in your code.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Andrew666
Groupie Joined: 15 October 2008 Status: Offline Points: 27 |
Post Options
Thanks(0)
|
If its of any interest, I had just the same problem --- I was using a RibbonBar with the CommandBar and I could create actions without error - but unless I created them BEFORE the ribbonbar controls, none of the action properties were executed --- i.e. I could set Enabled etc. without error, but they made no difference to the state of the control.
As soon as I created the actions before the controls, I could then do everything as per the documentation. Regards --Andrew |
|
rmcmanamy
Groupie Joined: 02 September 2009 Status: Offline Points: 54 |
Post Options
Thanks(0)
|
I've ran into the same problem but only with the Enabled action. Visible works fine but not enabled. This is a huge dissapointment in the product seeing how we have hundered of controls and it's rediculous to have to add the actions first when each control is supposed to have an action to begin with. I'm very dissapointed that this has not been resolved yet to say the least.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Are you sure you call EnableActions before you create these controls ??
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
rmcmanamy
Groupie Joined: 02 September 2009 Status: Offline Points: 54 |
Post Options
Thanks(0)
|
Yes. I finally tracked it down to some code I had added in to Enable\Disable all controls. In that I was looping through all the controls in the menu. When I changed that to test if an action existed based on a range of my ID's then it works. But it was strange before that it only was the Enable that didn't work, the Visible worked fine still.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |