cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
FlexeraFan
Level 5

How to change text color for InstallScript Project

Does anyone know how to change the text color in a dialog box? I am using an InstallScript project. I read this documentation at the link below, but I still can't get the text color to change using GetFon and CtrlSetFont.

Please see the attached image to get an idea of an example of the white text I am trying to use in the banner. This is just a mockup.

GetFont creates a handle to a font with specified style and size.
CtrlSetFont will associate the font to the item on the dialog.

https://community.flexera.com/t5/InstallShield-Knowledge-Base/How-to-change-text-font-in-InstallScript-project/ta-p/4122

Labels (1)
0 Kudos
(1) Reply
Jenifer
Flexera Alumni

Hi @FlexeraFan ,

 

There’s no way for script to be able to change dialog control text color at this time. As a possible workaround, you could use HTML controls to provide colored text on an InstallScript dialog. Updating the HTML markup and using CtrlSetText should even allow for some “dynamic” control behavior if text color needs to change.

The below link can help you to get more details:

https://helpnet.flexerasoftware.com/installshield19helplib/helplibrary/AddingHTMLLinkISDialog.htm

For an Example:

You can call CtrlSetText function with below html markup code:

  • Say control_ID is 50 of your text control
  • Which will set text color as red with string "This is a paragraph"

CtrlSetText( szDlg, 50, "[html]<style type=\"text/css\">html,body {padding:0; margin:0;} * {font-size: 8pt; color:red;font-family: \"MS Sans Serif\";}</style><p>This is a paragraph</p>");

 

Thanks,

Jenifer

0 Kudos