Print Page | Close Window

Ribbonbar Not Fully Left

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=9020
Printed Date: 31 January 2025 at 9:56am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Ribbonbar Not Fully Left
Posted By: StephenW
Subject: Ribbonbar Not Fully Left
Date 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



Replies:
Posted By: StephenW
Date Posted: 06 December 2007 at 10:28am
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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net