Standard Controls
The Standard tab contains the most commonly used controls. These are the building blocks of every form.
TLabel CT_LABEL = 1
Displays static text on a form. Non-editable, used for captions, descriptions, and labels.
| Property | Type | Default | Description |
cText | String | "" | Display text |
nLeft, nTop | Numeric | 0 | Position (pixels) |
nWidth | Numeric | 80 | Width in pixels |
oFont | Font | inherited | Font face and size |
nClrPane | Color | transparent | Background color |
| Event | Category | Description |
OnClick | Action | User clicked the label |
OnDblClick | Action | User double-clicked |
OnMouseDown | Mouse | Mouse button pressed |
| Platform | Native Widget |
| Windows | STATIC (SS_LEFT) |
| macOS | NSTextField (non-editable) |
| Linux | GtkLabel |
// xBase command syntax
@ 10, 20 SAY oLabel PROMPT "Name:" OF oForm SIZE 80
TEdit CT_EDIT = 2
Single-line text input field. The workhorse of data entry forms.
| Property | Type | Default | Description |
cText | String | "" | Current text content |
lReadOnly | Logical | .F. | Prevent user editing |
lPassword | Logical | .F. | Mask input with dots |
nWidth, nHeight | Numeric | 120, 24 | Size |
| Event | Category | Description |
OnChange | Action | Text content changed |
OnClick | Action | Control clicked |
OnEnter | Focus | Control received focus |
OnExit | Focus | Control lost focus |
OnKeyDown | Keyboard | Key pressed |
| Platform | Native Widget |
| Windows | EDIT (ES_AUTOHSCROLL) |
| macOS | NSTextField |
| Linux | GtkEntry |
// xBase command syntax
@ 10, 100 GET oEdit VAR "John Doe" OF oForm SIZE 200, 24
TMemo CT_MEMO = 24
Multi-line text editor. Supports word wrap and scroll bars.
| Property | Type | Default | Description |
cText | String | "" | Multi-line text content |
lReadOnly | Logical | .F. | Prevent editing |
lWordWrap | Logical | .T. | Wrap long lines |
| Platform | Native Widget |
| Windows | EDIT (ES_MULTILINE | WS_VSCROLL) |
| macOS | NSScrollView + NSTextView |
| Linux | GtkScrolledWindow + GtkTextView |
Standard push button. The most fundamental interactive control.
| Property | Type | Default | Description |
cText | String | "Button" | Button caption |
lDefault | Logical | .F. | Default button (Enter activates) |
lCancel | Logical | .F. | Cancel button (Escape activates) |
nWidth, nHeight | Numeric | 88, 26 | Size |
| Event | Category | Description |
OnClick | Action | Button clicked |
OnEnter | Focus | Button received focus |
OnKeyDown | Keyboard | Key pressed while focused |
| Platform | Native Widget |
| Windows | BUTTON (BS_PUSHBUTTON) |
| macOS | NSButton (NSRoundedBezelStyle) |
| Linux | GtkButton |
// xBase command syntax
@ 240, 120 BUTTON oBtn PROMPT "&OK" OF oForm SIZE 88, 26
oBtn:OnClick := { || MsgInfo( "Clicked!" ) }
TCheckBox CT_CHECKBOX = 4
Toggle check control. Can be checked or unchecked.
| Property | Type | Default | Description |
cText | String | "CheckBox" | Label text |
lChecked | Logical | .F. | Current check state |
// xBase command syntax
@ 50, 20 CHECKBOX oChk PROMPT "Active" OF oForm SIZE 120 CHECKED
Mutual exclusion selector. Only one radio button in a group can be selected.
| Platform | Native Widget |
| Windows | BUTTON (BS_AUTORADIOBUTTON) |
| macOS | NSButton (NSRadioButton) |
| Linux | GtkRadioButton |
TListBox CT_LISTBOX = 7
Scrollable list of selectable items.
| Platform | Native Widget |
| Windows | LISTBOX (WS_VSCROLL | LBS_NOTIFY) |
| macOS | NSScrollView + NSTableView |
| Linux | GtkScrolledWindow + GtkTreeView |
TComboBox CT_COMBOBOX = 5
Drop-down list selector with optional text input.
| Property | Type | Default | Description |
nItemIndex | Numeric | -1 | Selected item index (0-based) |
nItemCount | Numeric | 0 | Number of items (read-only) |
// xBase command syntax
@ 50, 20 COMBOBOX oCbx OF oForm ITEMS { "User", "Admin" } SIZE 150
TGroupBox CT_GROUPBOX = 6
Visual container that groups related controls with a labeled frame.
// xBase command syntax
@ 10, 10 GROUPBOX "Options" OF oForm SIZE 300, 100
TPanel CT_PANEL = 25
Flat container panel. Use as a background or to group controls without a visible border.
| Platform | Native Widget |
| Windows | STATIC (SS_SUNKEN) |
| macOS | NSBox (NSBoxPrimary) |
| Linux | GtkFrame |
Horizontal or vertical scroll bar control.
| Property | Type | Default | Description |
nMin | Numeric | 0 | Minimum value |
nMax | Numeric | 100 | Maximum value |
nPosition | Numeric | 0 | Current position |
lHorizontal | Logical | .T. | Horizontal (or vertical) |
11 Standard Controls
These controls are available on all platforms (Windows, macOS, Linux) and use native widgets for
maximum performance and OS integration.