Disable Popup Menu in Control Button |
Post Reply |
Author | |
idkami
Newbie Joined: 07 August 2011 Status: Offline Points: 3 |
Post Options
Thanks(0)
Posted: 07 August 2011 at 5:02am |
I want to ask, how do I disable pop-up menu on the control button. For more details, like the following picture.
please help --- thank's |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
You need implement Update event. Check any our sample in CommanBars folder.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
idkami
Newbie Joined: 07 August 2011 Status: Offline Points: 3 |
Post Options
Thanks(0)
|
samples in the folder just using syntax like this:
Set ControlSelect = GroupFind.Add(xtpControlPopup, ID_EDIT_SELECT, "&Select") ControlSelect.CommandBar.Controls.Add xtpControlButton, ID_EDIT_SELECT_ALL, "&Select All" Set Control = ControlSelect.CommandBar.Controls.Add(xtpControlButton, ID_EDIT_SELECT_OBJECTS, "&Select Objects") Control.Enabled = False Set Control = ControlSelect.CommandBar.Controls.Add(xtpControlButton, ID_EDIT_SELECT_MULTIPLE_OBJECTS, "Select Multiple Objects") Control.Enabled = False and I want to disable by using the "FindControl". I try to use syntax like this : RibbonBar.FindControl(, ID_EDIT_SELECT_OBJECTS).Enabled = False turns an error like this: "Object variable or with block variable not set" what's the solution .. Please help. I want to disable by using the function click on the CommandButton please help |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
FindControl is worst way for that. you need Update handler or Actions call EnableActions before you create Ribbon and now you can Enable/Disable with CommandBars.Actions(ID_EDIT_SELECT_OBJECTS).Enabled = False |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
idkami
Newbie Joined: 07 August 2011 Status: Offline Points: 3 |
Post Options
Thanks(0)
|
thanks for the help.
contained the same error when I use the event to another object, and errors like this: "Object variable or with block variable not set" but I've found a way to use commandbars_update: thanks in advance. if you can, use the click on CommandButton? |
|
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 |