Menu seperator
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=14490
Printed Date: 17 June 2025 at 5:09am Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: Menu seperator
Posted By: lexicon
Subject: Menu seperator
Date Posted: 10 June 2009 at 6:12am
Hello
How can i add a menu seperator in a menu?
Thank you
|
Replies:
Posted By: Oleg
Date Posted: 10 June 2009 at 12:44pm
set BeginGroup property of control.
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: lexicon
Date Posted: 11 June 2009 at 3:20am
This is the code
With Toolbar.Controls Set ControlNew = .Add(xtpControlSplitButtonPopup, 116, "themes") ControlNew.CommandBar.Controls.Add xtpControlButton, 1, "Windows XP" ControlNew.CommandBar.Controls.Add xtpControlButton, 2, "Office 2000" ControlNew.CommandBar.Controls.Add xtpControlButton, 3, "Office 2003" ControlNew.CommandBar.Controls.Add xtpControlButton, 4, "Office 2007" ControlNew.CommandBar.Controls.Add xtpControlButton, 5, "Office XP" ControlNew.CommandBar.Controls.Add xtpControlButton, 6, "Ribbon" ControlNew.CommandBar.Controls.Add xtpControlButton, 7, "Whidbey" End With
how to put a seperator after evey choice?
|
Posted By: Oleg
Date Posted: 11 June 2009 at 7:29am
Toolbar.Controls(1).BeginGroup = TRUE;
Toolbar.Controls(2).BeginGroup = TRUE;
etc or use loop.
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: lexicon
Date Posted: 11 June 2009 at 8:26am
Maybe my English its not so good that's why you don;t understand me and i'm apologize for this but
the project has a toolbar with 2 large buttons which are xtpControlSplitButtonPopup
Every button has some choices which are popup
I want to put a seperator inside of every choice in the popup menu not the 2 buttons.
Tha code is this
With Toolbar.Controls Set ControlNew = .Add(xtpControlSplitButtonPopup, 201, "Home") ControlNew.CommandBar.Controls.Add xtpControlButton, 107, "home-1" ControlNew.CommandBar.Controls.Add xtpControlButton, 113, "home-2" ControlNew.CommandBar.Controls.Add xtpControlButton, 115, "home-3" ControlNew.CommandBar.Controls.Add xtpControlButton, 120, "home-4" ControlNew.CommandBar.Controls.Add xtpControlButton, 200, "home-5" End With With Toolbar.Controls Set ControlNew = .Add(xtpControlSplitButtonPopup, 116, "Tehmes") ControlNew.BeginGroup = True ControlNew.CommandBar.Controls.Add xtpControlButton, 1, "Windows XP" ControlNew.CommandBar.Controls.Add xtpControlButton, 2, "Office 2000" ControlNew.CommandBar.Controls.Add xtpControlButton, 3, "Office 2003" ControlNew.CommandBar.Controls.Add xtpControlButton, 4, "Office 2007" ControlNew.CommandBar.Controls.Add xtpControlButton, 5, "Office XP" ControlNew.CommandBar.Controls.Add xtpControlButton, 6, "Ribbon" ControlNew.CommandBar.Controls.Add xtpControlButton, 7, "Whidbey" End With
I want to put a seperetator after every theme
How?
|
Posted By: Aaron
Date Posted: 11 June 2009 at 9:20am
There are several ways to do this. It will do same thing as Oleg mentioned in previous reply 
- ControlNew.CommandBar.Controls.Add (xtpControlButton, 107, "home-1").BeginGroup = True
- Dim ControlNewButton as CommandBarButton
Set ControlNewButton = ControlNew.CommandBar.Controls.Add (xtpControlButton, 107, "home-1" ControlNewButton.BeginGroup = True
- With ControlNew.CommandBar.Controls.Add (xtpControlButton, 107, "home-1")
.BeginGroup = True End With
Hope this helps
------------- Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0
Zero replies is not an option....
|
Posted By: lexicon
Date Posted: 11 June 2009 at 9:55am
Sorry but no one works
The 1st seems to be wrong because there is no method .beginGroup ( i have the 12.0.1 version)
The 2nd and the third running but with no change in the interface (no seperators)
|
Posted By: Aaron
Date Posted: 11 June 2009 at 10:23am
Hi,
I did test and following works. I copied your code and added code (red text)
Dim btn as CommandBarButton
With ToolBar.Controls Set controlnew = .Add(xtpControlSplitButtonPopup, 116, "Tehmes") controlnew.CommandBar.Controls.Add xtpControlButton, 1, "Windows XP" Set btn = controlnew.CommandBar.Controls.Add(xtpControlButton, 2, "Office 2000") btn.BeginGroup = True controlnew.CommandBar.Controls.Add xtpControlButton, 3, "Office 2003" controlnew.CommandBar.Controls.Add xtpControlButton, 4, "Office 2007" controlnew.CommandBar.Controls.Add xtpControlButton, 5, "Office XP" controlnew.CommandBar.Controls.Add xtpControlButton, 6, "Ribbon" controlnew.CommandBar.Controls.Add xtpControlButton, 7, "Whidbey" End With
------------- Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0
Zero replies is not an option....
|
Posted By: lexicon
Date Posted: 11 June 2009 at 10:53am
THIS IS WORKING
THANK YOU VERY MUCH FOR YOUR TIME
|
|