Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Docking Pane
  New Posts New Posts RSS Feed - Troubles with the CaptionFont and theTabFont
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Troubles with the CaptionFont and theTabFont

 Post Reply Post Reply
Author
Message
VDF1 View Drop Down
Groupie
Groupie
Avatar

Joined: 28 November 2007
Location: Netherlands
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote VDF1 Quote  Post ReplyReply Direct Link To This Post Topic: Troubles with the CaptionFont and theTabFont
    Posted: 05 January 2008 at 9:57am

I have troubles getting the font properties of the DockingPanePaintManager or the TabPaintManager to work.

When I use them from Visual DataFlex the font is not set but even worse any COM message after setting the font results in weird behavior. For example the dispatch ID that needs to be returned from CreatePane returns TRUE instead of a dispatch id.
 
So I tried the VB.NET MDISample to see what is happening there and the following code inserted before "Uncomment to Test it" has no effect on the results.
 
Dim TextFont As stdole.StdFont
TextFont = New stdlole.StdFont
TextFont.Name = "Lucida Handwriting Italic"
TextFont.Size = 15
TextFont.Bold = True
MDIDockingPaneManager.TabPaintManager.Font = TextFont
MDIDockingPaneManager.PanelPaintManager.Font = TextFont
 
I've also tried other less exotric font names like "Verdana"
 
I am using the 11.2.1 version.
 
What could be wrong?
Kind Regards,
Vincent Oorsprong
Data Access Europe B.V.
Lansinkesweg 4
7553 AE Hengelo
Netherlands
+31-74-2555609
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: 30 January 2008 at 3:05am
Hi,
 
You have to call DockingPaneManager.RedrawPanes before the changes take effect.
Back to Top
VDF1 View Drop Down
Groupie
Groupie
Avatar

Joined: 28 November 2007
Location: Netherlands
Status: Offline
Points: 16
Post Options Post Options   Thanks (0) Thanks(0)   Quote VDF1 Quote  Post ReplyReply Direct Link To This Post Posted: 30 January 2008 at 4:33am
Hi Aaron,
 
Did that but no luck, no change.
 
Related question; is it possible to have a different font for the captionbars and the tabbutton labels? There are two properties; one for the captionbar and one for the button label.
 
Kind Regards,
Vincent Oorsprong
Data Access Europe B.V.
Lansinkesweg 4
7553 AE Hengelo
Netherlands
+31-74-2555609
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: 30 January 2008 at 5:14am

Vincent,

You have to SET the font variable (like Set dockingPaneFont = Item.value) where Item.value is the variable of StdFont (in your case TextFont)
 
This is what I do for Pane Caption:
 
Case "Pane font"
            Dim dockingPaneFont As StdFont
            Set dockingPaneFont = Item.value(this is the value of a PropertyGridItem (FONT)
            frmMain.DockingPaneManager.PaintManager.CaptionFont = dockingPaneFont.Name
            frmMain.DockingPaneManager.PaintManager.CaptionFont.Size = dockingPaneFont.Size
            frmMain.DockingPaneManager.PaintManager.CaptionFont.Bold = dockingPaneFont.Bold
            frmMain.DockingPaneManager.PaintManager.CaptionFont.Italic = dockingPaneFont.Italic
            frmMain.DockingPaneManager.PaintManager.CaptionFont.Underline = dockingPaneFont.Underline
            frmMain.DockingPaneManager.RedrawPanes
and for the Pane Tabs
 
        Case "Pane tab font"
            Dim dockingPaneTabs As StdFont
            Set dockingPaneTabs = Item.value
            frmMain.DockingPaneManager.TabPaintManager.Font = dockingPaneTabs.Name
            frmMain.DockingPaneManager.TabPaintManager.Font.Size = dockingPaneTabs.Size
            frmMain.DockingPaneManager.TabPaintManager.Font.Bold = dockingPaneTabs.Bold
            frmMain.DockingPaneManager.TabPaintManager.Font.Italic = dockingPaneTabs.Italic
            frmMain.DockingPaneManager.TabPaintManager.Font.Underline = dockingPaneTabs.Underline
            frmMain.DockingPaneManager.RedrawPanes
 
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.125 seconds.