![]() |
EnableActions() problem |
Post Reply
|
| Author | |
MadRiver
Groupie
Joined: 21 August 2008 Location: United States Status: Offline Points: 22 |
Post Options
Thanks(0)
Quote Reply
Topic: EnableActions() problemPosted: 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
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 07 November 2008 at 5:09am |
|
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)
Quote Reply
Posted: 07 November 2008 at 8:43am |
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
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 10 November 2008 at 2:15am |
|
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)
Quote Reply
Posted: 10 November 2008 at 8:15am |
|
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
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 10 November 2008 at 11:29am |
|
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)
Quote Reply
Posted: 28 December 2008 at 11:35am |
|
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)
Quote Reply
Posted: 04 September 2009 at 12:49am |
|
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
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 04 September 2009 at 11:04am |
|
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)
Quote Reply
Posted: 04 September 2009 at 12:14pm |
|
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 |