OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Constructing and Destroying TButtonGadget

Here is the TButtonGadget constructor:

TButtonGadget(TResId bmpResId, int id, TType type = Command, bool enabled = false, TState state = Up, bool repeat = false);

where:

ParameterDescription
bmpResIdThe resource identifier for the bitmap resource to be displayed in the button. The size of the bitmap determines the size of the gadget, because shrink wrapping is turned on.
idThe gadget identifier. This is also the command that is posted when the gadget is pressed.
typeSpecifies the type of the gadget. The TType enum has three possible values:
  • Command specifies that the gadget is a command,
  • Exclusive specifies that the gadget is an exclusive setting button. Exclusive button gadgets that are adjacent to each other work together. You can set up exclusive groups by inserting other gadgets, such as separator gadgets or text gadgets, on either side of the group.
  • NonExclusive specifies that the gadget is a nonexclusive setting button. enabled Specifies whether or not the button gadget is enabled when it is first created. If the corresponding command is enabled when the gadget is created, the button is automatically enabled.
stateThe default state of the button gadget. The enum TState can have three values: Up, Down, or Indeterminate.
repeatIndicates whether the button repeats when held down. If repeat is true, the button repeats when it is clicked and held.

The destructor TButtonGadget::~TButtonGadget deletes the bitmap resources and, if the resource information is contained in a string, deletes the storage for the string.

See Also