View Full Version : Modifying a control on the InstallationType Wizard Page

09-27-2011, 07:01 PM
The InstallationType dialog has these nice custom controls built up with Text, Note, and a graphic. I needed a 3rd such control and found that I could copy one of the existing instances from the tree listing to create a 3rd. What I can't seem to do is alter the control itself. For one of my options I have too much text on the note, and would really like to adjust it so that the note has 3 lines instead of 2. I tried creating a new (smaller font) and applying that to "Note Text Style", but this just isn't working (perhaps an Installshield bug?? -- went down to 6pt font and saw no effect in the Wizard page view). Still, smaller font is a last resort, I'd much rather expand to 3 lines if I can edit the control. Does anyone know of a way to do this? Also, I'd like to eliminate the blue outline on the topmost control, but I didn't see any simple way to do this (on a related note, I noticed with the MaintenanceWelcome dialog I could "move" the blue outline to the IDC_REMOVE control by moving it up to be the first control listed under the dialog in the tree. This didn't work with InstallationType, though I suspect it's because I renamed the controls. Still, I'd really prefer no outline on any option for that dialog).

09-28-2011, 10:47 AM
The blue outline is an artifact of being selected; you will see this at run-time but it will move between the buttons as you arrow or tab around. The number of lines is dependent on a combination of font and size of the control; try increasing the height of your command link button. Also I know there were some bugs/limitations if you didn't specify everything on the command link button - try specifying all styles and the icon, and the styles might start working.

I'm wondering if we may need to reimplement more of this control ourselves rather than trying to depend on the standard Windows implementation (when available). It should increase flexibility and let us fix some of the less-expected behavior.

09-28-2011, 11:30 AM
Further, to expand on MichaelU's point, the Command Link Button will only add a 3rd line if the size of the button itself is beyond a certain point ( it has to be absurdly large ). Regrettably, the font size isn't used in the calculation of how many lines of text the note area is given if you specify a text style. This appears to be a result of the way we draw the picture ( if you remove all styles and resources associated with the Command Link Button you'll notice that the way the text and picture are rendered will drastically change ).

As long as you specify at least 1 text style or resource for the button, the InstallShield UI will draw the button. If you specify none of those then we let the default Common Control implementation take over. This is definitely something we could look for the future and improve.

Do you think it would be useful to be able to specify the number of lines to use in the note field? I think this could be of limited usefulness overall, but maybe there's an approach here I'm not thinking about. I'm guessing it's just more getting the note text area the optimal size to fit the desired text.

Also, you can add a Command Link button by right-clicking on a wizard page in the layout view ( the middle pain to the right of the property grid ) and you'll see a Context Menu containing new control.

09-28-2011, 12:42 PM
Ok, I see now that my newly-created font style needed to have 3 complete fonts in order to apply properly (I had set it to 6-pt size, but with only one font). In this case I am using the Setup Type dialog to list 3 product flavors, and one had too much description text to fit on two lines with the default BodyItalics font. I could go with a smaller font and 2 lines as long as all the text shows up, though if there were a way later on (in SP1, etc.) to specify more lines and have the button vertically center all the text to fit, that would look more professional.

I tried enlarging the button, but for now that increases the size allocated to the image, which further indents the image and the text. I need all 3 buttons to have their image and text line up, and there isn't room to similarly enlarge all the buttons (though I suppose I could go up a level to the Wizard Options and increase Page Width / Page Height, and adjust other dialogs as needed).

09-28-2011, 03:57 PM
Just to make sure: are you talking about having 3 available fonts for a text style made it work? If so, could you please let me know which 3 fonts you chose along with their style and bold/italics? That shouldn't be required, so it seems weird it would work that way. In my quick test, I couldn't reproduce that, but it could be specific to the fonts chosen.

But yeah, I agree with your observations. A vertically centered count of lines would probably provide a consistent and professional experience for users. I can't say when/if we'll be able to get to that, though ( or if we might end up choosing another route ).

09-28-2011, 04:13 PM
Bryan -- yes, having 3 fonts made it work.

I tried to emulate how the BodyItalics Font Style was setup (3 fonts, first Calibri, 10pt, Italicized, then Verdana, 8pt, Italicized, then Arial, 8 pt, Italicized) .

For my smaller version I have these 3 at the moment:
Verdana (7 pt Italicized)
Arial (7 pt Italicized)
Calibri (7 pt Italicized)

(once those 3 were configured, the Wizard page updated correctly)

Now that I see that I mixed up the order used in the standard BodyItalics Style, I'll probably switch my custom style's order to match (assuming that doesn't break it again).