Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Update event & command bar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Update event & command bar

 Post Reply Post Reply
Author
Message
dUGI View Drop Down
Newbie
Newbie


Joined: 11 August 2004
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote dUGI Quote  Post ReplyReply Direct Link To This Post Topic: Update event & command bar
    Posted: 10 September 2004 at 1:21pm

How to use commandbars_update event to show or hide one or more commandbars?

thans

Miroslav

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: 10 September 2004 at 1:24pm
To hide the MenuBar:
    CommandBars(1).Visible = False
'or
    CommandBars.ActiveMenuBar.Visible = False

To hide the 1st toolbar:
    CommandBars(2).Visible = False
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: 11 September 2004 at 9:10am

Depending on your intent, the 'Update' event probably isn't the best place to do that.  This event is fired several times a second for each visible control on a toolbar, and once for each control in a menu.

You certainly can use the 'Update' event for this, but it's really designed for you to update an individual control.  Since this code is called so often, you should minimize the processing that is done in the routine.

Just some extra thoughts on the subject... good luck!

Back to Top
dUGI View Drop Down
Newbie
Newbie


Joined: 11 August 2004
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote dUGI Quote  Post ReplyReply Direct Link To This Post Posted: 11 September 2004 at 9:39am

Thanks, but that will not solve my problem. It is really designed for individual control, so it won't fire update event for command bar. I tried do put some code, to show or hide command bar depending on type of form displayed (MDI child) but then I got problem with dock control which ih rather important.

I know about visible property :) but, still doesn't solve my problem. I have two toolbars in my program. One is visible all the time (toolbar Standard) and the other one is visible only if certain type of form is displayed. So, what event or piece of code should I use?

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: 11 September 2004 at 10:11am
Have you tried using the 'Activate' and 'Deactivate' events of the MDI Child to show/hide the toolbar on the main form?
Back to Top
dUGI View Drop Down
Newbie
Newbie


Joined: 11 August 2004
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote dUGI Quote  Post ReplyReply Direct Link To This Post Posted: 11 September 2004 at 10:22am

Thanks.

Yes, I tried! But that was one of the reasons why I switched from DataDynamics to CodeJock. I don't want to use Activate and esp. Deactivate in that manner.

Maybe I would manage to show/hide bar, but if there is no dock on the form. I can use this line:

cBars.Item(2).Visible = Not ActiveForm Is Nothing

but, then, I can't expand dock (at any side of the form). It starts to expand, expand a 0.5 cm, collapse, and repeating that!?! Rather strange behaviour!

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.160 seconds.