The Add method of the Panels Collection can
be used to add panels to the StatusBar at runtime.
The syntax is similar to the other Add methods
discussed in this chapter:
StatusBar1.Panels.Add(index, key, text, style,
Index and Key are the unique identifiers that
enable you to access a particular Panel object.
The Text argument is the text that appears in
a panel. How a Panel object appears and what
data it contains is determined by the Style
argument. Finally if you want to add an image
in the new panel, you can use the LoadPicture
function in the Picture argument to include
that image along with any other text that appears.
Panels can be removed at runtime by using
the Remove method of the StatusBar. To remove
a Panel object, you would use the following:
where the Index argument is either an integer equal to the Index property
of the panel that you are removing or a string value equal to the Key of the panel.
Using the StatusBar Control topics