Ribbonbar Not Fully Left |
Post Reply |
Author | |
StephenW
Groupie Joined: 21 November 2007 Location: United Kingdom Status: Offline Points: 34 |
Post Options
Thanks(0)
Posted: 06 December 2007 at 5:10am |
Hello I have added a pane to a VB6 project that has had a ribbon bar added to it. The layout was fine until the pane was added, docked to nothing on the left, but now the top ribbonbar is not against the left edge, but moved out to the right edge of the pane.
I cannot seem to find how to make it so the ribbonbar is fully left and not starting at the right edge of the pane.
I suspect it may be something to do with this code :
Private Sub objDockingManager_GetClientBordersWidth(Left As Long, Top As Long, Right As Long, Bottom As Long)
Dim lngLeft As Long
Dim lngTop As Long Dim lngRight As Long Dim lngBottom As Long ' Find the height of the statusbar
If staMain.Visible Then Bottom = staMain.Height End If ' Find the height of the command bar
If objCommandbars.ActiveMenuBar.Visible Then Call objCommandbars.ActiveMenuBar.GetWindowRect(lngLeft, lngTop, lngRight, lngBottom) Top = lngBottom End If End Sub
The GetWindowRect seems to work fine for the bottom position of the ribbonbar. Do I need to somehow set the left and right values also, and if so to what ?
Many thanks for your help
|
|
StephenW
Groupie Joined: 21 November 2007 Location: United Kingdom Status: Offline Points: 34 |
Post Options
Thanks(0)
|
Found the answer, sorry, this thread can be closed.
For anyone else wanting to know you have to set the commandbar to the dockingpane control so it knows it exists :
Call objDockingManager.SetCommandBars(objCommandbars)
Many thanks
|
|
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 |