Print Page | Close Window

Ribbonbar does not wrap menus

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=17672
Printed Date: 06 October 2024 at 4:17am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Ribbonbar does not wrap menus
Posted By: Hemesh
Subject: Ribbonbar does not wrap menus
Date 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 - 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



Replies:
Posted By: Aaron
Date 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....


Posted By: jpbro
Date 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



Posted By: Hemesh
Date 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



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