Commmand Bar "Standard" button |
Post Reply |
Author | |
trims30
Newbie Joined: 03 December 2009 Location: United States Status: Offline Points: 9 |
Post Options
Thanks(0)
Posted: 16 October 2017 at 11:09am |
Am using Command Bars Control in VB6 Just noticed that if I Right Click on Command Bar I get a pop-up that says "Standard".If I then click on the Standard button the command bar with all buttons disappears.
How do I prevent this from occurring? My Code is shown below:
Dim ToolBar As CommandBar Set ToolBar = CommandBars.Add("Standard", xtpBarTop)
ToolBar.EnableDocking 0
ToolBar.EnableDocking xtpFlagStretched ToolBar.ShowTextBelowIcons = True AddControl ToolBar.Controls, xtpControlButton, ID_Button_Clear, "Clear", False AddControl
ToolBar.Controls, xtpControlButton, ID_Button_Add, "New", False AddControl ToolBar.Controls, xtpControlButton, ID_Button_Edit, "Edit", False AddControl ToolBar.Controls, xtpControlButton, ID_Button_Delete, "Delete", False AddControl ToolBar.Controls, xtpControlButton, ID_Button_Save, "Save", False AddControl ToolBar.Controls, xtpControlButton, ID_Button_Sort, "Sort", False AddControl ToolBar.Controls, xtpControlButton, ID_Button_PgUp, "PgUp", False AddControl ToolBar.Controls, xtpControlButton, ID_Button_PgDn, "PgDn", False AddControl ToolBar.Controls, xtpControlButton, ID_Button_Exit, "Exit", False Set CommandBars.Icons = workspace.ImageManager.Icons ''Assign Icons CommandBars.Options.LargeIcons = True ''Use Large Icons CommandBars.Options.SetIconSize True, 24, 24 ''Size 32 x 32 CommandBars.Options.ShowExpandButtonAlways = False ''Don''t show Expand Buttons CommandBars(1).ModifyStyle XTP_CBRS_GRIPPER, 0 ''Hide Gripper on ToolBar CommandBars(2).ModifyStyle XTP_CBRS_GRIPPER, 0 ''Hide Gripper on Button Bar CommandBars.VisualTheme = xtpThemeOffice2003
|
|
trims30
Newbie Joined: 03 December 2009 Location: United States Status: Offline Points: 9 |
Post Options
Thanks(0)
|
I have found that setting toolbar.visible = true in sub CommandBars_ToolBarVisibleChanged will keep the toolbar visible after "Standard" is clicked.
Now, all I need to know is how to prevent "Standard" button from appearing when right clicking on tool bar. Suggestions PLEASE! |
|
olebed
Admin Group Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(0)
|
Hello, Try to use ToolBar.ContextMenuPresent = False or CommandBars(n).ContextMenuPresent = False
Regards, Oleksandr Lebed |
|
trims30
Newbie Joined: 03 December 2009 Location: United States Status: Offline Points: 9 |
Post Options
Thanks(0)
|
Thank you - that works Great!
Lee |
|
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 |