OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Shrink Wrapping a Gadget

You can use the TGadget::SetShrinkWrap function to specify whether you want the gadget window to "shrink wrap" a gadget.

When shrink wrapping is on for an axis, the overall size required for the gadget is calculated automatically based on the border size, margin size, and inner rectangle. This saves you from having to calculate the bounds size of the gadget manually.

You can turn shrink wrapping on and off independently for the width and height of the gadget. The syntax of SetShrinkWrap is

void SetShrinkWrap(bool shrinkWrapWidth, bool shrinkWrapHeight);
  • shrinkWrapWidth turns horizontal shrink wrapping on or off, depending on whether true or false is passed in.
  • shrinkWrapHeight turns vertical shrink wrapping on or off, depending on whether true or false is passed in.

See Also