Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Disable Popup Menu in Control Button
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Disable Popup Menu in Control Button

 Post Reply Post Reply
Author
Message
idkami View Drop Down
Newbie
Newbie
Avatar

Joined: 07 August 2011
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote idkami Quote  Post ReplyReply Direct Link To This Post Topic: Disable Popup Menu in Control Button
    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


Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 08 August 2011 at 3:28am
Hi,

You need implement Update event. Check any our sample in CommanBars folder.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
idkami View Drop Down
Newbie
Newbie
Avatar

Joined: 07 August 2011
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote idkami Quote  Post ReplyReply Direct Link To This Post Posted: 08 August 2011 at 10:31am
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

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 09 August 2011 at 2:51am
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
Back to Top
idkami View Drop Down
Newbie
Newbie
Avatar

Joined: 07 August 2011
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote idkami Quote  Post ReplyReply Direct Link To This Post Posted: 09 August 2011 at 5:46am
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?
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.140 seconds.