Print Page | Close Window

How to make button spacer

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=556
Printed Date: 11 December 2024 at 8:46pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to make button spacer
Posted By: blockwood
Subject: How to make button spacer
Date 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.



Replies:
Posted By: Bjarne
Date 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



Posted By: SuperMario
Date 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
   



Posted By: Boyd
Date 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.


Posted By: blockwood
Date 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.


Posted By: Bjarne
Date 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



Posted By: SuperMario
Date 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.



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