Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The TextStyle table lists different font styles used in controls having text.
The TextStyle table has the following columns.
Column | Type | Key | Nullable |
---|---|---|---|
TextStyle | Identifier | Y | N |
FaceName | Text | N | N |
Size | Integer | N | N |
Color | DoubleInteger | N | Y |
StyleBits | Integer | N | Y |
TextStyle
This column is the name of the font style. This name can be embedded in the text string to indicate a style change. Note that the font style name used in this field must not end with the characters: _UL. See Adding Controls and Text.
FaceName
A string indicating the name of the font. The string must be no more than 31 characters long.
Size
The font size measured in points. This must be a non-negative number.
Color
This column specifies the text color displayed by a Text Control. All other types of controls always use the default text color. The value put in this column should be computed using the following formula: 65536 * blue + 256 * green + red, where red, green, and blue are each in the range of 0-255. The value must not exceed 16777215, which is the value for white. The value is 0 for black, 255 for red, 65280 for green, 16711680 for blue and 8421504 for grey. Leaving the field empty specifies the default color.
Do not place transparent Text controls on top of colored bitmaps. The text may not be visible if the user changes the display color scheme. For example, text may become invisible if the user sets the high contrast parameter for accessibility.
StyleBits
A combination of bits indicating the formatting for the text.
The individual style bits have the following values.
Constant | Hexadecimal | Decimal | Style |
---|---|---|---|
msidbTextStyleStyleBitsBold | 0x001 | 1 | Bold |
msidbTextStyleStyleBitsItalic | 0x002 | 2 | Italic |
msidbTextStyleStyleBitsUnderline | 0x004 | 4 | Underline |
msidbTextStyleStyleBitsStrike | 0x008 | 8 | Strike out |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today