Option Ocx

Purpose

Creates an Ocx Option control in the current active form, window, or dialog.

Syntax

Ocx Option name = text$ [, id], x, y, b, h [, style%]

text$:control text
id%:control identifier
x, y, b, h:iexp
style%:the control styles

Description

An Option control displays an option that can be turned on or off.

Usually, Option controls are used in an option group to display options from which the user selects only one. You group Option controls by drawing them inside a container such as a Frame control, or a form. To group Option controls in a Frame, draw the Frame first, and then draw the Option controls inside. All Option controls within the same container act as a single group.

The Option Ocx control has the following properties, methods, and events.

Properties

Align | Appearance | Caption | Enabled | Font | FontBold | FontItalic | FontStrikethru | FontUnderline | FontName | FontSize | Height | HelpContextID | hWnd | Index | Left | Top | MouseCursor | MouseIcon | MousePointer | Name | Picture | PushLike | TabStop | Tag | Text | ToolTiptext | Value | Visible | WhatsThisHelpID | Width | WinStyle

Methods

DoClick | Move | Refresh | SetFocus | SetFont | TextHeight | TextWidth | ZOrder

Events

Click | DblClick | GotFocus | LostFocus | KeyDown | KeyUp | KeyPress | MouseDown | MouseUp | MouseMove

Remarks

CheckBox and Option controls function similarly but with an important difference: Any number of CheckBox controls on a form can be selected at the same time. In contrast, only one Option in a group can be selected at any given time.

To display text next to the CheckBox, set the Caption property. Use the Value property to determine the state of the control-selected, cleared, or unavailable.

See Also

Ocx, OcxOcx

Animation, CheckBox, ComboBox, Command, CommDlg, Form, Frame, Image, ImageList, Label, ListBox, ListView, MonthView, ProgressBar, RichEdit, Scroll, Slider, StatusBar, TabStrip, TextBox, Timer, TrayIcon, TreeView, UpDown

{Created by Sjouke Hamstra; Last updated: 07/10/2017 by James Gaite}