JavaScript Editor JavaScript Editor     JavaScript Debugger

Previous Section Next Section

Main Page

Setting Control Fonts

You can set the fonts used in Web server controls that display text with their Font property. This property returns an object that has these properties (although note that not all properties will be supported by all browsers):

  • Bold— Gets/sets whether the font is bold.

  • Italic— Gets/sets whether the font is italic.

  • Name— Gets/sets the main font name.

  • Names— Gets/sets an array of font names.

  • Overline— Gets/sets whether the font is overlined.

  • Size— Gets/sets the font size.

  • Strikeout— Gets/sets whether the font is struck out.

  • Underline— Gets/sets whether the font is underlined.

The Size property here matches the kind of sizes you can use in Web browsers, and can take these values:

  • Large— New size is two sizes larger than the default font size.

  • Larger— New size is one size larger than in the parent element.

  • Medium— New size is one size larger than the default font size.

  • Small— The default font size.

  • Smaller— New size is one size smaller than the parent element.

  • XLarge— New size is three sizes larger than the base font size.

  • XSmall— New size is one size smaller than the base font size.

  • XXLarge— New size is four sizes larger than the base font size.

  • XXSmall— New size is two sizes smaller than the base font size.

For example, here's how you might underline text in a label:

Label1.Font.Underline = True
Previous Section Next Section




JavaScript Editor Free JavaScript Editor     JavaScript Editor