Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Menu seperator
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Menu seperator

 Post Reply Post Reply
Author
Message
lexicon View Drop Down
Groupie
Groupie


Joined: 26 January 2007
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote lexicon Quote  Post ReplyReply Direct Link To This Post Topic: Menu seperator
    Posted: 10 June 2009 at 6:12am
Hello
How can i add a menu seperator in a menu?
Thank you
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: 10 June 2009 at 12:44pm
set BeginGroup property of control.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
lexicon View Drop Down
Groupie
Groupie


Joined: 26 January 2007
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote lexicon Quote  Post ReplyReply Direct Link To This Post 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?

 
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: 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
Back to Top
lexicon View Drop Down
Groupie
Groupie


Joined: 26 January 2007
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote lexicon Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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
 
  1. ControlNew.CommandBar.Controls.Add (xtpControlButton, 107, "home-1").BeginGroup = True
  2. Dim ControlNewButton as CommandBarButton
    Set ControlNewButton = ControlNew.CommandBar.Controls.Add (xtpControlButton, 107, "home-1"
          ControlNewButton.BeginGroup = True
  3. 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....
Back to Top
lexicon View Drop Down
Groupie
Groupie


Joined: 26 January 2007
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote lexicon Quote  Post ReplyReply Direct Link To This Post 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)
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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....
Back to Top
lexicon View Drop Down
Groupie
Groupie


Joined: 26 January 2007
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote lexicon Quote  Post ReplyReply Direct Link To This Post Posted: 11 June 2009 at 10:53am
THIS IS WORKING
THANK YOU VERY MUCH FOR YOUR TIME
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.031 seconds.