Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Ribbon Font
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Ribbon Font

 Post Reply Post Reply
Author
Message
DonB View Drop Down
Newbie
Newbie
Avatar

Joined: 25 January 2007
Location: United States
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote DonB Quote  Post ReplyReply Direct Link To This Post Topic: Ribbon Font
    Posted: 11 February 2007 at 4:54pm

Samples produce proper behavior depending on Windows font settings.  Even changing on the fly using Appearance dialog, font changes w/system.  Looking at your code, nothing w/fonts except in the options section to change size.  For the life of me, can not produce same effect.  I have some Win2K TS folks, so use 2 flavors in testing.  Ribbon or Office 2000 look.  I call this routine from every Form using XCB's.

Sub XCommandBarsSetup(oCB As XtremeCommandBars.CommandBars, _
 oRibbon As XtremeCommandBars.RibbonBar, _
 oControlBox As XtremeCommandBars.CommandBarPopup)

 With oCB
  .GlobalSettings.App = App
  .EnableCustomization True
  .LoadDesignerBars
  .Icons.MaskColor = vbMagenta
  If (m_NCM.ColorDepth < COLOR32_eCD) Then
   ReplaceIcons oCB
  End If
      
  .StatusBar.AddPane 0
  With .StatusBar.Pane(0)
   .Style = SBPS_STRETCH
   .Text = C_Ready
  End With
      
  If (m_NCM.ColorDepth > COLOR8_eCD) Then
   .Options.SetIconSize True, 32, 32
   Dim i As Long
   Do While (.Count > 0)
    .Item(1).Delete
   Loop
         
   Set oRibbon = .AddRibbonBar(C_Ribbon)
   With oRibbon
    .SetFlags xtpFlagHideMDIButtons, 0
    .EnableDocking xtpFlagStretched
    .EnableFrameTheme
    .ShowCaptionAlways = False
    Set oControlBox = .AddSystemButton()
   End With
         
   .VisualTheme = xtpThemeOffice2007
   .EnableOffice2007Frame True
  Else
   .Item(1).SetFlags xtpFlagHideMDIButtons, 0
   .Options.SetIconSize True, 24, 24
   .VisualTheme = xtpThemeOffice2000
  End If
 End With
End Sub
 
If I do nothing and user has Large or Extra Large fonts set, XCB has normal font sizes.  Like sample I want to do nothing with Menu/Ribbon and follow user settings.   I change all other controls to reflect user settings but XCB is causing grief.  The only way I can get desired result was to do this:
 
Private Sub pCommandBarsFont()
'
 If bForm_Activate Then
  With Me!CB
   Set .Options.Font = NCM.Font(MenuFont_NCM)
   Set .StatusBar.Font = .Options.Font
   If Not (m_Ribbon Is Nothing) Then
    Set m_Ribbon.TabPaintManager.Font = .Options.Font
    Set m_Ribbon.RibbonPaintManager.CaptionFont = .Options.Font
    m_Ribbon.FontHeight = NCM.FontHeight
    m_Ribbon.RecalcLayout
   End If
   .PaintManager.RefreshMetrics
   .RecalcLayout
  End With
 End If
'
End Sub
This does produce desired results except for the Title Bar size which remains Normal size no matter what.  Is there a particular order to do things that produce same results as your sample.  Thanks in advance, Don
Back to Top
DonB View Drop Down
Newbie
Newbie
Avatar

Joined: 25 January 2007
Location: United States
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote DonB Quote  Post ReplyReply Direct Link To This Post Posted: 11 February 2007 at 5:44pm

After a fresh shower :)  Could there be a boolean property to just follow metrics?  That way you do what you do very well and all we have to worry about are dumb controls.  Something simple, .GlobalSettings.FollowMetrics = True.  No worrying about when properties are set, objects are created etc.  Anyway, just a thought.  Regards, Don

Back to Top
DonB View Drop Down
Newbie
Newbie
Avatar

Joined: 25 January 2007
Location: United States
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote DonB Quote  Post ReplyReply Direct Link To This Post Posted: 12 February 2007 at 2:52pm
Windows XP with Segoe UI font installed, ribbon tab font never changes, the font is small and can't change size.  Uninstall Segoe UI and problem goes away.
Back to Top
DonB View Drop Down
Newbie
Newbie
Avatar

Joined: 25 January 2007
Location: United States
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote DonB Quote  Post ReplyReply Direct Link To This Post Posted: 14 February 2007 at 1:23am

Something is going on with Ribbon and fonts.  Use toolbars that come canned with VB6 and never had to touch them.  Large and Extra Large fonts now get reduced.  No Ribbon, canned toolbar font follows system like normal.

Back to Top
DonB View Drop Down
Newbie
Newbie
Avatar

Joined: 25 January 2007
Location: United States
Status: Offline
Points: 21
Post Options Post Options   Thanks (0) Thanks(0)   Quote DonB Quote  Post ReplyReply Direct Link To This Post Posted: 14 February 2007 at 1:28am
Oops, last message should be in SkinFramework section.
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.031 seconds.