Print Page | Close Window

Command Bar Peoblem in vb

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=1185
Printed Date: 12 December 2024 at 2:50am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Command Bar Peoblem in vb
Posted By: amolrajurkar
Subject: Command Bar Peoblem in vb
Date Posted: 17 September 2004 at 5:17am

I have a problem in command bar. I want to add a menu with check mark and second problem is that i want to remove toolbar customization buttons or links. I am working in visual basic 6.0.

 

 

Kindly reply ASAP



-------------
Amol Rajurkar



Replies:
Posted By: SuperMario
Date Posted: 17 September 2004 at 6:30am
In execute event:
    ID_TOOLBAR_VISIBLE:
          CommandBars(2).Visible = !CommandBars(2).Visible
          Control.Checked = CommandBars(2).Visible

You could move last line to Update event:
    ID_TOOLBAR_VISIBLE:
          Control.Checked = CommandBars(2).Visible  

To Remove Button:
    Commandbars.Options.ShowExpandButtonAlways = False


Posted By: amolrajurkar
Date Posted: 17 September 2004 at 7:04am

Thank you for sending the code. I was able to remove the customize buttons through your code. but the check mark option is not clear.

This is what i am doing...

 Set controlcheck = CommandBars.ActiveMenuBar.Controls.Add(xtpControlPopup, 10, "&View")
        With controlcheck.CommandBar.Controls
             .Add xtpControlButton, 11, "Tool Bar"
         End With

Or can i stop user to move my tool bar, i mean i want to lock my toolbar.

 

Thank you again,

Plz  Reply ASAP



-------------
Amol Rajurkar


Posted By: SuperMario
Date Posted: 17 September 2004 at 7:11am
Dim Control As CommandBarControl
 Set controlcheck = CommandBars.ActiveMenuBar.Controls.Add(xtpControlPopup, 10, "&View")
        With controlcheck.CommandBar.Controls
             Set Control =  .Add(xtpControlButton, 11, "Tool Bar")
             Control.Checked = True
         End With

Then in Update event:
    Case 11:
          Control.Checked = CommandBars(2).Visible  

To Disable Docking of a toolbar:
    CommandBars(2).ModifyStyle XTP_CBRS_GRIPPER, 0
    CommandBars(2).EnableDocking False


Posted By: amolrajurkar
Date Posted: 17 September 2004 at 8:17am

Thank you for helping me. The code is perfect.

Nice way to describe



-------------
Amol Rajurkar



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