Working with Balloons

The Balloon object contains a series of properties that control how the balloon will be displayed on the screen. Table 14.12 lists these properties. All but a few of these properties should be very familiar to you. The BorderColor property allows you to change the color of the border. The FontCharSet allows you to specify which character set should be used to display the text inside the balloon.

Table 14.12: Balloon Object Properties

Property Description
BackColor Specifies the background color of the balloon
BorderColor Specifies the color of the balloon’s border
CharsPerLine Specifies the average number of characters that can be displayed in a single line of the balloon
Enabled When set to True, means that the balloon will be enabled
FontBold When set to True, means that the balloon’s text will be displayed in bold
FontCharSet Specifies the type of character set used by the font
FontItalic When set to True, means that the balloon’s text will be displayed in italics
FontName Specifies the name of the font used to display the characters
FontSize Specifies the size of the characters to be displayed
FontStrikethru When set to True, means that a single line will be drawn through the center of the characters displayed in the balloon
FontUnderline When set to True, means that the characters displayed in the balloon will be underlined
ForeColor Specifies the color of the characters
NumberOfLines Specifies the number of lines of text that the balloon will hold
Visible When set to True, means that the balloon will be displayed

Probably the most important properties of the Balloon object are NumberOfLines and CharsPerLine. The NumberOfLines property is fairly straightforward—it simply specifies the number of lines that will be displayed inside the balloon. The CharsPerLine property specifies the number of average characters you will be able to display in a single line. It doesn’t mean that you will always be able to display that many characters in a line, unless you are using a nonproportional font such as Courier.

TIP: It’s hard to scroll when there are no scroll bars: Since the balloon doesn’t come equipped with scroll bars, you need to plan the size of the balloon carefully. Using too small a balloon or too much text will make the text difficult to read, and using too large a balloon will waste screen space. Also, you should remember that the words appear as they are spoken. Since most people (and computers) speak slower than they read, you might not need as much space as you think you do.

© 1998 SYBEX Inc. All rights reserved.