Print Page | Close Window

Update ribbon from Office 2007 style to 2010 style

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=17382
Printed Date: 23 November 2024 at 2:56pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Update ribbon from Office 2007 style to 2010 style
Posted By: ou81aswell
Subject: Update ribbon from Office 2007 style to 2010 style
Date Posted: 05 October 2010 at 7:55pm
I'm using ActiveX 13.2.1.
 
My ribbon, created with the CommandBar Designer has a round Office button a la Office 2007 which contains the classic File menu items.
 
How do I update it so that the Office button becomes the File menu a la Office 2010?
 
Thanks.


-------------
VB6, CJ 13.2.1, targeting XP, Vista and Win7



Replies:
Posted By: Dett
Date Posted: 06 October 2010 at 3:10pm
Hi, I'm working with 13.4.0 but I think in 13.2. it works also.
Try:

Private Sub setOffice2010Ribbon(paramCB As CommandBars)
    Dim ctrl            As CommandBarControl
    Dim rb              As RibbonBar

    With paramCB
        .EnableOffice2007Frame True
        .VisualTheme = xtpThemeRibbon
        Set rb = .ActiveMenuBar
        rb.EnableFrameTheme
    End With

    Set ctrl = rb.ControlSystemButton                        ' the round button
    ctrl.Style = xtpButtonCaption                            ' caption only, no picture
End Sub



-------------
Product: Xtreme SuitePro (ActiveX) version 16.3.1
Language: VB6 SP6
Platform: Windows 7 Enterprise 64-Bit


Posted By: ou81aswell
Date Posted: 29 October 2010 at 7:33am
The following 3 lines of code, placed right after my initialization code did the trick. Thanks!
 
' RibbonBar was already setup by my init code
Dim ctrl As XtremeCommandBars.CommandBarControl
Set ctrl = RibbonBar.ControlSystemButton
ctrl.Style = xtpButtonCaption 'caption only, no picture


-------------
VB6, CJ 13.2.1, targeting XP, Vista and Win7



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