This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Change TextStyle in Text control not working
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jun 15, 2016
12:02 PM
Change TextStyle in Text control not working
Hi all,
I'm working on an installer (MSI InstallScript) with a custom banner image that is dark (no way around it as that is what our art dept desires). This is causing the text for the various text controls to be nearly unreadable on their respective dialogs. I've searched the internet, read the help, and read more than a few threads from this forum in hopes of finding a solution.
To this point, the prescribed solutions have not worked.
I have created a few new TextStyles in the TextStyle table via the direct editor and copied the names to be sure that I have them spelled correctly and in the correct case.
As per the help and the various other resources, for an MSI InstallScript project the only way I can change the text style of an individual control is to preface the text with one of two strings :
{\StyleName}Text I want to display
OR
{&StyleName}Text I want to display
As I have mentioned, neither of these seem to work. What I end up with is a display string that contains
"{\StyleName}Text I want to display"
OR
"{StyleName}Text I want to display" (I have also tried setting the "no prefix" property to true for this one, but it doesn't seem to matter)
I assume that I'm missing something crucial here as others seem to have found success with this (and there are enough other companies using InstallShield in this manner that the doors would be getting knocked down if this wasn't something that could be achieved).
Does anyone have any suggestions as to what I need to do to accomplish this goal?
Regards and thanks in advance,
Dan
I'm working on an installer (MSI InstallScript) with a custom banner image that is dark (no way around it as that is what our art dept desires). This is causing the text for the various text controls to be nearly unreadable on their respective dialogs. I've searched the internet, read the help, and read more than a few threads from this forum in hopes of finding a solution.
To this point, the prescribed solutions have not worked.
I have created a few new TextStyles in the TextStyle table via the direct editor and copied the names to be sure that I have them spelled correctly and in the correct case.
As per the help and the various other resources, for an MSI InstallScript project the only way I can change the text style of an individual control is to preface the text with one of two strings :
{\StyleName}Text I want to display
OR
{&StyleName}Text I want to display
As I have mentioned, neither of these seem to work. What I end up with is a display string that contains
"{\StyleName}Text I want to display"
OR
"{StyleName}Text I want to display" (I have also tried setting the "no prefix" property to true for this one, but it doesn't seem to matter)
I assume that I'm missing something crucial here as others seem to have found success with this (and there are enough other companies using InstallShield in this manner that the doors would be getting knocked down if this wasn't something that could be achieved).
Does anyone have any suggestions as to what I need to do to accomplish this goal?
Regards and thanks in advance,
Dan
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jun 15, 2016
03:41 PM
Since InstallScript MSI projects use InstallScript dialogs, instead of Windows Installer dialogs, {\style} or {&style} prefix does not work. You may want to use the CtrlSetFont InstallScript function to specify a font for a control in a custom dialog.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jun 15, 2016
09:34 PM
hidenori wrote:
Since InstallScript MSI projects use InstallScript dialogs, instead of Windows Installer dialogs, {\style} or {&style} prefix does not work. You may want to use the CtrlSetFont InstallScript function to specify a font for a control in a custom dialog.
That's good info, but what about standard dialogs? Can I change the font prior to a call to, say sdAskPath, or sdFinish? In that vein, what about the setup progress dialog, which doesn't appear in the dialogs list at all as far as I can tell?
I'm not sure I have access to that dialog at all, at least not that I've been able to see.
Again, thanks in advance, I'm still finding my way around the functionality and have been thrown into the deep end, so to speak.
Regards,
Dan
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jun 15, 2016
10:58 PM
I replied already, but don't see it in the thread, so I'll reply again.
The CtrlSetFont sounds like a good thing for sure, but what about non-custom dialogs? Where would I call that function in, say, the sdAskPath or the sdWelcome dialog? And what about the Progress dialog, which doesn't seem to have an editable dialog in the IS UI?
There are many controls and I assume I'd need the name of each individual control in order to change this information?
Also, will this allow me to retrieve defined TextStyles from the TextStyle table? Ultimately I'd like to be able to change the color of the font because the banner is dark and the default black font color makes the text unreadable. As such, I'd like to use white or gray or some other light shade for my font.
Based on the example and the description, it seems like this doesn't do what I'd like.
As always, the help and info is appreciated. I'm new to IS and I've sort of been tossed into the deep end of the pool so thorough information and examples are appreciated.
Regards,
Daniel
The CtrlSetFont sounds like a good thing for sure, but what about non-custom dialogs? Where would I call that function in, say, the sdAskPath or the sdWelcome dialog? And what about the Progress dialog, which doesn't seem to have an editable dialog in the IS UI?
There are many controls and I assume I'd need the name of each individual control in order to change this information?
Also, will this allow me to retrieve defined TextStyles from the TextStyle table? Ultimately I'd like to be able to change the color of the font because the banner is dark and the default black font color makes the text unreadable. As such, I'd like to use white or gray or some other light shade for my font.
Based on the example and the description, it seems like this doesn't do what I'd like.
As always, the help and info is appreciated. I'm new to IS and I've sort of been tossed into the deep end of the pool so thorough information and examples are appreciated.
Regards,
Daniel
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jun 16, 2016
02:54 PM
Actually, you can customize the function implementation of built-in InstallScript dialogs such as sdAskDestPath and sdWelcome. To paste the function block of a built-in dialog to your code, select Dialog Source from the Event Categories list box on the left and select a dialog from the Events list box on the right of the script toolbar in the Script Editor in the InstallScript View. However, the Progress dialog is a special dialog that cannot be customized at all unfortunately.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jun 16, 2016
03:12 PM
Cool, thanks!
But am I able to use the TextStyle in CtrlSetFont or otherwise set the font color?
I guess I'll play around with it a bit and see what I can come up with.
But am I able to use the TextStyle in CtrlSetFont or otherwise set the font color?
I guess I'll play around with it a bit and see what I can come up with.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jun 17, 2016
03:47 PM
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. See Using an HTML Control on a Dialog for more information.