Print Page | Close Window

Troubles with the CaptionFont and theTabFont

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=9227
Printed Date: 01 October 2024 at 12:08am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Troubles with the CaptionFont and theTabFont
Posted By: VDF1
Subject: Troubles with the CaptionFont and theTabFont
Date 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



Replies:
Posted By: Aaron
Date Posted: 30 January 2008 at 3:05am
Hi,
 
You have to call DockingPaneManager.RedrawPanes before the changes take effect.


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


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



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