OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Adding Decorations To Decorated Frame Windows

TDecoratedFrame provides the ability to add decorations by using the TDecoratedFrame::Insert() member function.

To use Insert, you must first construct a control to be inserted. Valid controls include control bars (TControlBar), status bars (TStatusBar), button gadgets (TButtonGadget), and any other control type based on TDialog.

After you have constructed the control, use Insert to insert the control into the decorated frame window. Insert takes two parameters, a reference to the control and a location specifier. TDecoratedFrame provides the enum TLocation, which lets you specify four possible values: Top, Bottom, Left, and Right.

Example

Suppose you want to construct a status bar to add to the bottom of your decorated frame window. The code would look something like this:

TStatusBar* sb = new TStatusBar(0,
TGadget::Recessed,
TStatusBar::CapsLock |
TStatusBar::NumLock |
TStatusBar::Overtype);
TDecoratedFrame* frame = new
TDecoratedFrame(0, "Decorated Frame", 0, true);
frame->Insert(*sb, TDecoratedFrame::Bottom);

See Also