Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Ribbonbar does not wrap menus
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Ribbonbar does not wrap menus

 Post Reply Post Reply
Author
Message
Hemesh View Drop Down
Senior Member
Senior Member


Joined: 10 August 2010
Status: Offline
Points: 135
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hemesh Quote  Post ReplyReply Direct Link To This Post Topic: Ribbonbar does not wrap menus
    Posted: 14 December 2010 at 6:50am
Hi,

When using the ribbon bar as the menu system (to get the the Big O) I don't seem to be able to get the menus to wrap and drop down onto the next line.



But when just using the command bar it just works.


Does anyone know the setting i've missed?  I just don't seem to to be able to see it.

I've attached a demo project with a bool to toggle both menu modes;
uploads/6296/CodeJockMDIissue-MenuOverlap.zip

And this is the code;

Private Sub MDIForm_Load()
    Dim objRibbon As RibbonBar
    Dim objRootMenuBar As CommandBar
    Dim objControl As CommandBarControl
    Dim blnUseRibbon As Boolean
   
   
blnUseRibbon = True
   
    CommandBarsGlobalSettings.App = App

    SkinFramework1.LoadSkin App.Path & "\Styles\" & "Office2007.cjstyles", "NORMALBLACK.INI"
    'SkinFramework1.LoadSkin App.Path & "\Styles\" & "Office2007.cjstyles", "NORMALBLUE.INI"
    SkinFramework1.ApplyOptions = xtpSkinApplyMetrics Or xtpSkinApplyFrame Or xtpSkinApplyColors Or xtpSkinApplyMenus

    SkinFramework1.ApplyWindow Me.hWnd
    CommandBarsGlobalSettings.Office2007Images = App.Path & "\Styles\" & "Office2007Black.dll"
    If blnUseRibbon Then
        SkinFramework1.RemoveWindow Me.hWnd
    End If

    CommandBars1.EnableActions
    CommandBars1.VisualTheme = xtpThemeOffice2007

    With CommandBars1.Options
        .KeyboardCuesShow = xtpKeyboardCuesShowAlways
        .KeyboardCuesUse = xtpKeyboardCuesUseNone
        .ShowKeyboardTips = True
    End With

    ' Create ribbon bar
    If blnUseRibbon Then
        Set objRibbon = CommandBars1.AddRibbonBar("RB")
        objRibbon.EnableDocking xtpFlagAlignTop
        objRibbon.EnableFrameTheme
    Else
        Set objRootMenuBar = CommandBars1.AddMenuBar("MAIN")
        objRootMenuBar.ShowGripper = False
    End If
   

    ' Big O system button
    If blnUseRibbon Then
        Set objControl = objRibbon.AddSystemButton
        Set objRootMenuBar = objControl.Parent
    Else
        Set objControl = objRootMenuBar.Controls.Add(xtpControlPopup, 78, "File")
    End If
    objControl.CommandBar.Controls.Add xtpControlButton, 1, "AAA"
    objControl.CommandBar.Controls.Add xtpControlButton, 2, "BBB"
    objControl.CommandBar.Controls.Add xtpControlButton, 3, "CCC"

    Dim a As Integer

    For a = 0 To 10
        ' Invoice Menu
        Set objControl = objRootMenuBar.Controls.Add(xtpControlButtonPopup, 300, "Menu " & a)
        objControl.CommandBar.Controls.Add xtpControlButton, 301, "New Invoice"
        objControl.CommandBar.Controls.Add xtpControlButton, 302, "Amend Invoice"
    Next a

    ' Help Menu
    Set objControl = objRootMenuBar.Controls.Add(xtpControlButtonPopup, 500, "Help")
    objControl.Flags = xtpFlagRightAlign 'Or xtpFlagWrapRow

    objControl.CommandBar.Controls.Add xtpControlButton, 501, "Help File"
    objControl.CommandBar.Controls.Add xtpControlButton, 502, "About"
End Sub


Product: Xtreme SuitePro (ActiveX) version 18.5.0

Platform: Windows 7 Enterprise (64-bit)

Language: Visual Basic 6.0
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 14 December 2010 at 8:13am
Hi,
 
I don't use Ribbon but I guess same as any toolbar...
 
objRibbon.EnableDocking xtpFlagAlignTop + xtpStrechedShared
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....
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 14 December 2010 at 9:02am
Unfortunately, it doesn't seem to work for the Ribbon menu...I haven't had much luck finding a solution either - this may be a question or request for CJ.

Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
Hemesh View Drop Down
Senior Member
Senior Member


Joined: 10 August 2010
Status: Offline
Points: 135
Post Options Post Options   Thanks (0) Thanks(0)   Quote Hemesh Quote  Post ReplyReply Direct Link To This Post Posted: 14 December 2010 at 11:24am
Thanks everyone.  Just wanted to check I wasn't missing the obvious Ermm

I have raised a case (25798)
Product: Xtreme SuitePro (ActiveX) version 18.5.0

Platform: Windows 7 Enterprise (64-bit)

Language: Visual Basic 6.0
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.234 seconds.