The customize dropdown on ribbonbars QuickAccessCo |
Post Reply |
Author | |
wakerunner
Groupie Joined: 29 September 2007 Status: Offline Points: 85 |
Post Options
Thanks(0)
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.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Try RibbonBar.ShowQuickAccess = False
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
wakerunner
Groupie Joined: 29 September 2007 Status: Offline Points: 85 |
Post Options
Thanks(0)
|
I want to display the quickaccessbuttons, but not the customize dropdown. Setting ribbonbar.showquickaccess=false make the quickaccess buttons dissappear also.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
RibbonBar.ControlQuickAccess.Visible = False
?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
hades
Newbie Joined: 04 January 2008 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
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) 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...... |
|
hades
Newbie Joined: 04 January 2008 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
sh*t sorry...didn't read ur question properly...oleg is right...
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
hades, thanks, also nice solution :)
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
wakerunner
Groupie Joined: 29 September 2007 Status: Offline Points: 85 |
Post Options
Thanks(0)
|
RibbonBar.ControlQuickAccess.Visible = False
That was it. Thank you.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, Don't forget that user can still right click in Ribbon ;-)
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1354 |
Post Options
Thanks(0)
|
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 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. |
|
wakerunner
Groupie Joined: 29 September 2007 Status: Offline Points: 85 |
Post Options
Thanks(0)
|
Thank you, I always say a line of code is worth 1000 words.
|
|
RedFin
Groupie Joined: 26 March 2008 Location: Australia Status: Offline Points: 47 |
Post Options
Thanks(0)
|
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 |
|
wakerunner
Groupie Joined: 29 September 2007 Status: Offline Points: 85 |
Post Options
Thanks(0)
|
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.
|
|
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 |