The ActiveX StatusBar control is one of the easiest of the controls to use. It can be pretty passive and just show the date and time, if you want, or it can be updated constantly and give a good picture of what's now taking place.
The StatusBar control is used on the main form of WindowsCommonControls (see Figure 14.18).
Like other ActiveX controls, the StatusBar control is partially made up of a collection. Some examples of collections used are the TabStrip control, which uses the Tabs collection, and the ImageList control, which uses the ListImages collection. The StatusBar control uses the Panels collection, which I examine in a moment. First, I discuss the overall properties used by the StatusBar control.
The StatusBar control doesn't use as many properties from the overall control as some of the other ActiveX controls. Table 14.5 shows a few properties that are used by the StatusBar control overall.
Property | Description |
---|---|
Style | Allows you to choose multiple panels (0 - Normal) or a single panel (1 - Simple) |
SimpleText | Sets the simple text displayed when the Style of 1 - Single Panel Simple Text is chosen |
MousePointer | Used the same as the other ActiveX controls, allowing you to choose which style to use for the mouse pointer |
The real power behind the StatusBar control lies in the Panels collection. With this collection, you can specify not only the number of panels to use, but also what style of information you want to display in each panel. This includes Text, Caps Lock status, Num Lock status, Date, Time, and more. Table 14.6 lists some useful properties for the StatusBar Panel object.
You can set these properties at design time or runtime. The one most likely to be set at runtime is the Text property. Figure 14.19 shows the panel properties.
3.147.65.247