Print Page | Close Window

TaskDialog font settings

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=18234
Printed Date: 01 July 2024 at 8:06am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: TaskDialog font settings
Posted By: gibra
Subject: TaskDialog font settings
Date Posted: 17 April 2011 at 6:41pm
There is a way to set Font attributes in TaskDialog?
 
I explain better,
I have a application where all texts are set with Font.Size = 10
 
So, I would display the messages, displayed using TaskDialog, with the same font size.
But in TaskDialog the Font properties seems missing... Ouch
 
Yhank in advance.
Smile


-------------
gibra
CJ SuiteControl v: 13.x to 19.x
Windows 10 64bit
VS2019 - VB6.0 SP6
<a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8



Replies:
Posted By: jpbro
Date Posted: 17 April 2011 at 10:34pm
You can do it with Markup:


   With Me.TaskDialog1
      .EnableMarkup = True
     
      .MainInstructionText = "<TextBlock FontSize='10pt'>Main Instruction</TextBlock>"
      .ContentText = "<TextBlock FontSize='10pt'>Content </TextBlock>"
      .AddButton "<TextBlock FontSize='10pt'>Test</TextBlock>", 100
     
      .ShowDialog
   End With



-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: gibra
Date Posted: 18 April 2011 at 5:11am
Thank jbpro.
 
I knowed this, but I don't want to use Markup;
because it force me to write extra code any time for all TaskDialog messages. Cry
 
Using a simple Font object become very simple. Like:
- FontMain.Size = 12
- FontContents.Size = 10
- FontFooter.Size = 8
 
Thank anyway for your suggestion.
Smile


-------------
gibra
CJ SuiteControl v: 13.x to 19.x
Windows 10 64bit
VS2019 - VB6.0 SP6
<a href="http://nuke.vbcorner.net/Home/tabid/36/language/en-US/Default.aspx" rel="nofollow">VS/VB 6.0 Installer v6.8


Posted By: Willowmaster
Date Posted: 18 April 2011 at 5:46am
Maybe you can use a template string in a module like this:
     Const cstrMainInstructionText As String = "<TextBlock FontSize='10pt'>%1<TextBlock>"
 
With every TaskDialog you can use:
     .MainInstructionText = Replace(cstrMainInstructionText, "%1", "Custom tekst here..")
 
You can do the same for ContextText and AddButton


-------------
Product: Xtreme SuitePro (ActiveX) version 15.3.1

Platform: Windows XP (32bit) - SP 3 (on VMWare)

Language: Visual Basic 6.0





Posted By: jpbro
Date Posted: 18 April 2011 at 7:39am
It would be a nice feature to have, but I think you will have to open a support ticket to request it :(

-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6




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