Troubles with the CaptionFont and theTabFont |
Post Reply |
Author | |
VDF1
Groupie Joined: 28 November 2007 Location: Netherlands Status: Offline Points: 16 |
Post Options
Thanks(0)
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
You have to call DockingPaneManager.RedrawPanes before the changes take effect.
|
|
VDF1
Groupie Joined: 28 November 2007 Location: Netherlands Status: Offline Points: 16 |
Post Options
Thanks(0)
|
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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 |
|
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 |