Statusbar |
Post Reply |
Author | |
Maui
Groupie Joined: 10 June 2004 Status: Offline Points: 95 |
Post Options
Thanks(0)
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 Dim StatusBar As IStatusBar 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. 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 |
|
Boyd
Senior Member Joined: 08 December 2003 Location: United States Status: Offline Points: 285 |
Post Options
Thanks(0)
|
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 |
|
Maui
Groupie Joined: 10 June 2004 Status: Offline Points: 95 |
Post Options
Thanks(0)
|
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. |
|
Boyd
Senior Member Joined: 08 December 2003 Location: United States Status: Offline Points: 285 |
Post Options
Thanks(0)
|
Glad I could help!
|
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
In the next release (9.71 available in 2-3 weeks), the statusbar will support icons\custom controls and setting the colors
|
|
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 |