Partilhar via


ScrollableText Control in MSI

A few questions about the ScrollableText Control in MSI come up every once in a while, so I thought I'd capture the answers here for posterity. Ideally this is information that will eventually show up in the MSI SDK documentation (but probably "word-smithed" to be more appropriate for "official documentation").

Q: Why doesn't my text show up in the Scrollable Text Control?

A: As noted at the bottom of the ScrollableText control documentation, the ScrollableText Control is really just a RICHEDIT control. The way the Windows Installer creates the control requires that only rich text be loaded.

That means if you tried to put just "My Text" in the control, you'll end up with a blank control. Instead, you need something more like "{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset0 Arial;}}\viewkind4\uc1\pard\f0\fs20 My Text\par}".

Q: But my text is rich text and it still won't show up. What now?

A: If you wrote your rich text file in Word, try loading the file into WordPad and then saving. Word has support for many advanced features of RTF that the typical RICHEDIT control cannot handle. Saving the document via WordPad removes any of those advanced features.

Of course, be sure to go back and read through your text. It is possible the conversion process may remove some important formatting that makes your text unreadable.

Q: Great, but when I click on my hyperlinks they don't launch the browser?

The RICHEDIT control does not support hyperlinks. You can color the text blue and underline it but the text still won't be a clickable hyperlink.

Hyperlinks in general are just not supported by the native MSI UI. Sad but true.

Comments

  • Anonymous
    May 31, 2006
    What about triggering the MSI Developers to add some kind of a ScrallableHTMLControl?
  • Anonymous
    June 01, 2006
    As an InstallShield user I note that I simply select my ScrollableText control and set the "File Name" property to the path of my RTF file.  This sets a custom column in the control table that at build time causes IS to stream the contents of the RTF file into the Text column of the control.  Very simple without having to know what RTF looks like in a text editor.

    In WiX I notice that the schema for the Binary Element has a SourceFile attribute and it's a child of the Control Element.  Am I correct in assuming this is how you put together similar functionality in WiX?

    If so it seems more helpful to blog about that then point out how to place RTF directly in the Text attribute. After all I'd think that someone else is responsible for providing the text not the setup developer.
  • Anonymous
    November 14, 2006
    I wish to know, is any way exist to use some properties value in ScrollableText. I need to show huge dynamic text (installation set), but now I found that WindowsInstaller has no ability to display such text. Other way doesn't help too: text control hasn't scrollbar, and edit control is allowing edit those text. I hope I miss right way and it nevertheless exists, and providence helps me to find it out.