Desktop User Guides > Professional > Interview scripting > Writing interview scripts > Page layout facilities > Styles > Styles for navigation buttons
 
Styles for navigation buttons
You can define styles for navigation buttons in the routing section of the script. You can change any or all of the following characteristics:
text color, typeface (font family), size, and effect
button color
button border style and color
button dimensions
whether a button is visible or hidden.
All statements that specify styles for navigation buttons must have the following structure:
IOM.Navigations[NavigationTypes.Type].Style.property = value
where:
Type is the name of the button whose style you are defining. The names for the standard navigation buttons are as follows: nvNext, nvPrev, nvStop, nvFirst, nvLast, and nvGoto. If you want to apply the same setting to all navigation buttons, you can replace [NavigationTypes.Type] with [..].
property is the name of the style property to be set. In some cases this will be a simple name whereas in others it will be an object name and property name combination.
value is the setting for the property.
Properties for navigation buttons
BgColor
Button color. A color name or hexadecimal RGB value enclosed in double quotation marks. For a list of the color names and their equivalent RGB values, see:
http://www.w3schools.com/html/html_colornames.asp
Color
Text color: As for BgColor.
Height
Button height. A number followed by a unit of measurement. Valid measurement units include inches (in), millimeters (mm), centimeters (cm), points (pt), pixels (px), or ems (em). The default is pixels.
Width
Button width: As for Height.
Cell.BorderColor
Button border color: As for BgColor.
Cell.BorderStyle
Button border style
BorderStyles.bstyle, where bstyle is one of bsDouble, bsGroove, bsInset, bsNone, bsOutset, bsRidge, or bsSolid. See Cell Borders for examples of these styles.
Cell.BorderWidth
Button border width: A number that is read as a measurement in pixels.
Font.Family
Text typeface: One or more font names separated by commas, with the whole list enclosed in double quotation marks. Names containing spaces must be enclosed in single quotation marks. The browser uses the first listed font that it finds.
Font.Size
Text size: A number that is the point size for the text.
Font.Effects
Text effects: FontEffects.effect, where effect is one of the following: feBold, feItalic, feOverline, feStrikethrough, feSubscript, feSuperscript, or feUnderline. To apply multiple effects, list the effects separated by plus signs.
Hidden
Whether to hide the button. True to hide the button or False to display it.
Text on navigation buttons
The rules for setting styles for the text on navigation buttons are similar to those for setting styles for categorical response texts, except that you use IOM.Navigations[..] instead of Qname.Categories[..]. To display the text on all navigation buttons in Tahoma or Trebuchet MS font, you type:
IOM.Navigations[..].Label.Style.Font.Family = "Tahoma, 'Trebuchet MS'"
To change the font family for the text on an individual navigation button, you must name the button using the NavigationTypes type definition. The following example changes the font family for the Next button only:
IOM.Navigations[NavigationTypes.nvNext].Label.Style.Font.Family = "Arial"
To change the point-size of the text on all navigation buttons, type:
IOM.Navigations[..].Label.Style.Font.Size = 16
You might have to increase the size of the navigation buttons to accommodate the larger text.
You can apply font effects to text on navigation buttons. To underline the text on the Stop button you would type:
IOM.Navigations[NavigationTypes.nvStop].Label.Style.Font.Effects = _
FontEffects.feUnderline
For information on changing the labels displayed on navigation buttons, see Navigation buttons.
Button color, size, and borders
The following illustration shows a variety of style settings that affect the appearance of the navigation buttons themselves as well as the text displayed on them:
This graphic is described in the surrounding text.
Navigation buttons showing use of different colors, font settings, and dimensions
It was created by the following statements:
With IOM.Navigations[NavigationTypes.nvPrev].Style
  .BgColor = "yellow"
  .Color = "green"
  .Font.Size = 14
  .Width = "6em"
End With
With IOM.Navigations[NavigationTypes.nvNext].Style
  .Font.Family = "'Palatino Linotype'"
  .Font.Effects = FontEffects.feBold+FontEffects.feItalic
  .Cell.BorderStyle = BorderStyles.bsSolid
End With
With IOM.Navigations[NavigationTypes.nvStop].Style
  .BgColor = "white"
  .Color = "red"
  .Cell.BorderColor = "blue"
  .Cell.BorderStyle = BorderStyles.bsDouble
  .Cell.BorderWidth = 6
  .Height = "3em"
  .Width = "4em"
End With
For navigation buttons, the following properties produce identical results:
Style.Color and Label.Style.ColorStyle.BgColor and Label.Style.BgColorStyle.Font.Family and Label.Style.Font.FamilyStyle.Font.Size and Label.Style.Font.SizeStyle.Font.Effects and Label.Style.Font.Effects
See also
Styles