Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Statusbar
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Statusbar

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


Joined: 10 June 2004
Status: Offline
Points: 95
Post Options Post Options   Thanks (0) Thanks(0)   Quote Maui Quote  Post ReplyReply Direct Link To This Post Topic: Statusbar
    Posted: 20 August 2004 at 3:44pm

There is a bug with how the statusbar works with the CommandBars DescriptionText.

The documentation says "The custom status bar uses the DescriptionText property of your Command Bar controls to display text in the "Idle Text" pane when the mouse is positioned over a Command Bar control simply by adding a pane with Id zero."

The bug is that the DescriptionText is actually displayed in the pane with Index 0 (as opposed to ID 0)

Here is how I created my statusbar

    Const ID_STATUS_PANE = 0
    Const ID_CUSTOM_PANE = 300

    Dim StatusBar As IStatusBar
    Set StatusBar = formMain.CommandBars.StatusBar
    StatusBar.IdleText = ""
    StatusBar.AddPane ID_CUSTOM_PANE
    StatusBar.SetPaneStyle ID_CUSTOM_PANE, SBPS_STRETCH
    
    StatusBar.AddPane ID_STATUS_PANE
    StatusBar.SetPaneWidth ID_STATUS_PANE, 100

    StatusBar.Visible = True

When I move my mouse over a menu item the description text is always displayed in the ID_CUSTOM_PANE pane. ie the pane that was created first.

I came across this because I couldnt see how big the pane was since the first pane is created with no borders so I started shuffeling the panes around to see what would happen.

On further investigation it seems that a pane created with ID = 0 is created with pre assigned styles which isnt mentioned in the documentation.
1. It is created with no borders style.
2. It seems to be created with the stretch style applied so you cant set its width (since stretch style overrides any size value)

I found that to get the layout I required I had to enter StatusBar.SetPaneStyle 0, 0 then I could size my panes properly.

Can you add TextAlignment as a property please.

Can you add icons as a property please.

Can you add a MinimumWidth property please which could be used in conjunction with the stretch style.

Can you add a PaneAlignment please to make it possible for one small pane on the left and one small pane on the right.

 



Edited by Maui
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: 22 August 2004 at 9:16am

Maui,

I'd suggest moving to another StatusBar control that provides more functionality and just use the 'ControlSelected' event in CommandBars to set the description of the control in the status bar.  This event is fired when the user moves the mouse over a control.  One small hint when using this approach... the 'ControlSelected' event is fired with a null reference to a control when the user moves the mouse off the control, so this should be used to clear the description text.

The vbAccelerator site has some StatusBar controls you can look at if you don't already have one in mind:  http://www.vbaccelerator.com/home/VB/Code/Controls/Status_Ba r/index.asp

Back to Top
Maui View Drop Down
Groupie
Groupie


Joined: 10 June 2004
Status: Offline
Points: 95
Post Options Post Options   Thanks (0) Thanks(0)   Quote Maui Quote  Post ReplyReply Direct Link To This Post Posted: 06 September 2004 at 8:17am

Have done as you suggested.

I spent about 6 hours trying to get the Codejock control to work properly without bugs. The vbaccelerator one I got going in 5 mins.

Thanks for you help.

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: 06 September 2004 at 8:26am
Glad I could help!
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: 27 July 2005 at 9:16am
In the next release (9.71 available in 2-3 weeks), the statusbar will support icons\custom controls and setting the colors
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.219 seconds.