Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - How to make button spacer
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to make button spacer

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


Joined: 23 March 2004
Status: Offline
Points: 45
Post Options Post Options   Thanks (0) Thanks(0)   Quote blockwood Quote  Post ReplyReply Direct Link To This Post Topic: How to make button spacer
    Posted: 23 March 2004 at 1:50pm
How do I make a "spacer" between buttons which in Office2003 looks like an indented vertical line between buttons.
Back to Top
Bjarne View Drop Down
Newbie
Newbie
Avatar

Joined: 30 December 2003
Location: Denmark
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bjarne Quote  Post ReplyReply Direct Link To This Post Posted: 23 March 2004 at 1:54pm

Hi Blockwood,

I guess you mean a seperator. You can create that by the BeginGroup option. Example:

        Set mCtr = .Add(xtpControlButton, ID_PRINT, "Print")
             mCtr.BeginGroup = True

Regards,
Bjarne

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 23 March 2004 at 1:57pm
The BeginGroup property needs to be set, see code below:

Dim ToolBar As CommandBar
   
 Set ToolBar = CommandBars.Add("Standard", xtpBarTop)
 With ToolBar.Controls
        .Add xtpControlButton, ID_FILE_NEW, "&New"
        .Add xtpControlButton, ID_FILE_OPEN, "&Open"
       
        Set Control = .Add( xtpControlButton, ID_FILE_SAVE, "&Save")
        Control.BeginGroup = True
              
        Set Control = .Add(xtpControlButton, ID_FILE_PRINT, "&Print")
        Control.BeginGroup = True
       
        Set Control = .Add(xtpControlButton, ID_HELP_ABOUT, "&About")
        Control.BeginGroup = True
       
End With
   

Back to Top
Boyd View Drop Down
Senior Member
Senior Member


Joined: 08 December 2003
Location: United States
Status: Offline
Points: 285
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boyd Quote  Post ReplyReply Direct Link To This Post Posted: 23 March 2004 at 1:58pm
Just to follow up on Bjarne's post, setting 'BeginGroup' to True will create a vertical spacer BEFORE the control that has this property.  In menu's, it appears above the control.  In toolbars, it appears to the left of the control.
Back to Top
blockwood View Drop Down
Groupie
Groupie


Joined: 23 March 2004
Status: Offline
Points: 45
Post Options Post Options   Thanks (0) Thanks(0)   Quote blockwood Quote  Post ReplyReply Direct Link To This Post Posted: 23 March 2004 at 2:13pm
yes "separator" thx for the great responses and sorry for dumb question - i see now it was obviousl.
Back to Top
Bjarne View Drop Down
Newbie
Newbie
Avatar

Joined: 30 December 2003
Location: Denmark
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bjarne Quote  Post ReplyReply Direct Link To This Post Posted: 23 March 2004 at 2:16pm

Hi Blockwood,
There is no such things as dumb questions. Personally I have asked lots of them, and learned a lot.

Bjarne

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 23 March 2004 at 2:31pm
Blockwood,
We are happy to answer your questions  For every question asked, there are probably 100 other people with the same question.
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.188 seconds.