OptionButton (opt)

OptionButton - This control allows the user to select from a list of possible choices. These controls are usually placed within a Frame.


These should be used when you want the user to pick from a small number of mutually exclusive choices
These are always used in groups of at least two as when one is selected the others are unselected automatically.
If you dialog box contains more than one set of Option Buttons then each set must have the same GroupName otherwise they all become part of the same set
Alternatively you can place your option buttons in a Frame that automatically groups them.


Properties

AcceleratorSets or retrieves the accelerator key for a control.
AlignmentSpecifies the position of a control relative to its caption.
AutoSizeSpecifies whether an object automatically resizes to display its entire contents.
BackColorSpecifies the background color of the object.
BackStyleReturns or sets the background style for an object.
CaptionDescriptive text that appears on an object to identify or describe it.
EnabledSpecifies whether a control can receive the focus and respond to user-generated events.
FontSpecifies the font used to display the caption text. Tahoma, regular, 8 (default)
ForeColorSpecifies the foreground color of an object.
GroupNameCreates a group of mutually exclusive OptionButton controls.
LockedSpecifies whether a control can be edited.
MouseIconAssigns a custom icon to an object.
MousePointerSpecifies the type of pointer displayed when the user positions the mouse over a particular object.
PictureSpecifies the bitmap to display on an object.
PicturePositionSpecifies the location of the picture relative to its caption.
SpecialEffectSpecifies the visual appearance of an object.
TextAlignSpecifies how text is aligned in a control.
TripleStateDetermines whether a user can specify, from the user interface, the Null state for a CheckBox or ToggleButton.
ValueSpecifies the state or content of a given control.
WordWrapIndicates whether the contents of a control automatically wrap at the end of a line.

Events

BeforeDragOverOccurs when a drag-and-drop operation is in progress.
BeforeDropOrPasteOccurs when the user is about to drop or paste data onto an object.
ChangeOccurs when the Value property changes.
ClickOccurs when the user clicks on the control.
DblClickOccurs when the user points to an object and then clicks a mouse button twice.
ErrorOccurs when a control detects an error and cannot return the error information to a calling program.
KeyDownOccurs when the user presses a key on a running form while that form or a control on it has the focus.
KeyPressOccurs when the user presses an ANSI key.
KeyUpOccurs when the user releases a key on a running form while that form or a control on it has the focus.
MouseDownOccurs when the user presses the mouse button.
MouseMoveOccurs when the user moves the mouse.
MouseUpOccurs when the user releases the mouse button.

© 2025 Better Solutions Limited. All Rights Reserved. © 2025 Better Solutions Limited TopPrevNext