Print Page | Close Window

The customize dropdown on ribbonbars QuickAccessCo

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=9229
Printed Date: 24 June 2024 at 9:20am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: The customize dropdown on ribbonbars QuickAccessCo
Posted By: wakerunner
Subject: The customize dropdown on ribbonbars QuickAccessCo
Date Posted: 06 January 2008 at 1:19am
Is there a way to make the Customize dropdown box not display on the QuickAccessControls on ribbonbars? I'm talking about the whole thing not just the customize menu item, I do not want the dropdown / menu to be there at all.
 



Replies:
Posted By: Oleg
Date Posted: 06 January 2008 at 2:28pm
Hi,
Try RibbonBar.ShowQuickAccess = False


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: wakerunner
Date Posted: 07 January 2008 at 9:19am
I want to display the quickaccessbuttons, but not the customize dropdown. Setting ribbonbar.showquickaccess=false make the quickaccess buttons dissappear also.


Posted By: Oleg
Date Posted: 08 January 2008 at 2:13am
 
RibbonBar.ControlQuickAccess.Visible = False
 
?


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: hades
Date Posted: 08 January 2008 at 3:24am

hey wakerunner,

umm this is how its done(assuming its the customize button u want to remove),

first you have to find the ID of the control(in your case the id of the control is 9607 or 9604, i think its 9607).

Since you weren't the person who assigned the id you can find it by using this function(its already built for you, obviously..hehe), the below function is what is used usually to execute the commands.

Private Sub CommandBars_Execute(ByVal Control As xtremecommandbars.ICommandBarControl)
       msgbox  Control.ID
end sub

now that you have the id,

you have to enable actions for the commandbar,

      CommandBars.EnableActions

then before creating the ribbon bar add the action to the control,

   CommandBars.Actions.Add 9607, "New", "Add", "Adding", "toolbar"

(the string variables passed can be anything, but the id has to be the same)
then create the ribbon bar and then type in the code
      
        Dim action As CommandBarAction
        Set action = CommandBars.Actions(9607) (control id)
        action.Visible = False
......
hope this was helpful......


Posted By: hades
Date Posted: 08 January 2008 at 3:28am
sh*t sorry...didn't read ur question properly...oleg is right...


Posted By: Oleg
Date Posted: 08 January 2008 at 4:16am
hades, thanks, also nice solution :)

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: wakerunner
Date Posted: 08 January 2008 at 9:24am
RibbonBar.ControlQuickAccess.Visible = False
 
That was it. Thank you.


Posted By: Oleg
Date Posted: 08 January 2008 at 3:19pm

Hi,

Don't forget that user can still right click in Ribbon ;-)


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: jpbro
Date Posted: 22 January 2008 at 5:49pm
I'm a little slow on this reply, but if you are interested in preventing the user from seeing the customize popup menu on right-click, you can check out this demo (with freely usable source code):

http://www.collidingscopes.com/cmdbarbehave.zip - http://www.collidingscopes.com/cmdbarbehave.zip

It uses subclassing to allow you to prevent the menu from appearing as well as preventing your app from closing when the user double-clicks the system button.


Posted By: wakerunner
Date Posted: 23 January 2008 at 11:04am
Thank you, I always say a line of code is worth 1000 words.


Posted By: RedFin
Date Posted: 26 March 2008 at 12:45am
I found this prevents the context menu displaying -

Private Sub CommandBars1_ToolBarContextMenu(ByVal ToolBar As XtremeCommandBars.ICommandBar, ByVal ContextMenu As XtremeCommandBars.ICommandBar)
    ContextMenu.Controls.DeleteAll
End Sub


Posted By: wakerunner
Date Posted: 26 March 2008 at 8:56am
Thanks for the tip. It does exactly what I wanted. I had given up and thought that I would just have to live with it.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net