[QUESTION] StatusBar and multiple Commandbars |
Post Reply |
Author | |
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
Posted: 26 July 2011 at 1:43pm |
Hi,
Is there a way to have multiple Commandbars and have only one Statusbar in mainform?
I have more than one Commandbars control on a form (same reason as with the DockingPanes with PictureBox <> Form issue I started in Controls forum) and I would like to show user some info about the buttons on the toolbars when hovered.
If this can't be done, is there a way to create different toolbars and "attach" them to the proper PictureBox (or DockingPane) If this means that I have only Commandbars control so be it... Minor issue
Thanks a lot in advance
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
Xander75
Senior Member Joined: 26 April 2007 Status: Offline Points: 353 |
Post Options
Thanks(0)
|
Aaron,
I believe you should be able to use many CommandBars and only one StatusBar. In my Projects I usually split out how I build up my GUI and create a reference to the StatusBar so I can get click events and what not from it. That way I can always then reference it. Below is a small snippet of code form a project of mine that shows how you can create a StatusBar on a form, make it public and with events.
As for creating CommandBars then attaching them to PictureBoxes (or DockingPanes) I am not sure if that can be done as like you I have always used multiple instances of the CommandBars control to do just that. Would be nice if this could be done though. |
|
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
|
younicke
Senior Member Joined: 11 March 2005 Status: Offline Points: 107 |
Post Options
Thanks(0)
|
in my case there are times that i use commandbars on other forms... and the way that i do to show the hint on the statusbar of the main form is by using this commandbars event
supposing this is your commandbar on other form Private Sub CBarsOtherForm_ControlSelected(ByVal Control As XtremeCommandBars.ICommandBarControl) If Not Control Is Nothing Then 'display hint here using the control.descriptiontext... frmMain.CommandBars.StatusBar.Pane(1).Text = Control.DescriptionText Else frmMain.CommandBars.StatusBar.Pane(1).Text = "Ready..." End If End Sub |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Thanks for both replies
I guess this isn't going to be solved in an easy way...
Alexander: Do you have Commandbars for every form? Do you happen to use DockingPanes as well? Yes:How do you add toolbars to these panes? NO:Question for other users, how do you add toolbars to panes (Single Commandbar or same as me multiple Commandbars)?
Allan: I guess this would be the easiest solution, it does work and easy to implement, just add ControlSelected event handler (for every used Commandbars) and copy/paste code
Thanks a lot
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
Xander75
Senior Member Joined: 26 April 2007 Status: Offline Points: 353 |
Post Options
Thanks(0)
|
Aaron,
I try an use CommandBars only on forms were I don't want the ToolBar on the Main form (MDI App) to have the options. younicke's is what I meant from my code snippet, the only difference being it that you can use the WithEvents in my code to fire button clicks if you require that code in the StatusBar. I looked into using one CommandBar and trying to place menus that where floating into containers like PictureBoxes, DockingPanes etc but this didn't work as the CommandBars.AttachToWindow attaches the CommandBar control, not the separate toolbar or menubar |
|
Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6) |
|
younicke
Senior Member Joined: 11 March 2005 Status: Offline Points: 107 |
Post Options
Thanks(0)
|
u really have to use a separate commandbars for docking panes there's no other way
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Seems we can't have it all... Would be nice though, if CodeJock would add such thing. I was fiddling around with SetParent API and I'm able to reposition the toolbar but that's all. You can't drag toolbar around and width is calculated from the pane where the toolbar originally was located Now, I wouldn't mind if the toolbars weren't dragable but the width is a problem. Is there someone who has an idea or two?
CodeJock support? Any ideas? Future implementations?
Thanks a lot in advance
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
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 |