OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Modifying and Accessing Gadget Appearance

You can modify and check the margin width, border width, and border style of a gadget by using the following functions:

void SetBorders(TBorders& borders);
TBorders &GetBorders();
void SetMargins(TMargins& margins);
TMargins &GetMargins();
void SetBorderStyle(TBorderStyle style);
TBorderStyle GetBorderStyle();

The border is the outermost boundary of a gadget. The TBorders structure used with the SetBorders and GetBorders functions has four data members. These unsigned data members, Left, Right, Top, and Bottom, contain the width of the respective borders of the gadget.

The margin is the area between the border of the gadget and the inner rectangle of the gadget. The TMargins structure used with the TGadget::SetMargins and TGadget::GetMargins functions has four data members. These int data members, Left, Right, Top, and Bottom, contain the width of the respective margins of the gadget.

The TGadget::TBorderStyle enum used with the TGadget::SetBorderStyle and TGadget::GetBorderStyle functions is the same one used with the TGadget constructor. The various border style effects are achieved by painting the sides of the gadget borders and margins differently for each style.

See Also