![]() |
Ribbon Font |
Post Reply ![]() |
Author | |
DonB ![]() Newbie ![]() ![]() Joined: 25 January 2007 Location: United States Status: Offline Points: 21 |
![]() ![]() ![]() ![]() ![]() 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
|
|
![]() |
|
DonB ![]() Newbie ![]() ![]() Joined: 25 January 2007 Location: United States Status: Offline Points: 21 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
DonB ![]() Newbie ![]() ![]() Joined: 25 January 2007 Location: United States Status: Offline Points: 21 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
|
DonB ![]() Newbie ![]() ![]() Joined: 25 January 2007 Location: United States Status: Offline Points: 21 |
![]() ![]() ![]() ![]() ![]() |
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. |
|
![]() |
|
DonB ![]() Newbie ![]() ![]() Joined: 25 January 2007 Location: United States Status: Offline Points: 21 |
![]() ![]() ![]() ![]() ![]() |
Oops, last message should be in SkinFramework section.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |