Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Docking Pane
  New Posts New Posts RSS Feed - Ribbonbar Not Fully Left
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Ribbonbar Not Fully Left

 Post Reply Post Reply
Author
Message
StephenW View Drop Down
Groupie
Groupie
Avatar

Joined: 21 November 2007
Location: United Kingdom
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote StephenW Quote  Post ReplyReply Direct Link To This Post Topic: Ribbonbar Not Fully Left
    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
Back to Top
StephenW View Drop Down
Groupie
Groupie
Avatar

Joined: 21 November 2007
Location: United Kingdom
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote StephenW Quote  Post ReplyReply Direct Link To This Post 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
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.047 seconds.