Additional Controls
The Additional tab provides enhanced visual and input controls that extend the standard set with graphics, grids, and specialized editors.
TBitBtn CT_BITBTN = 12
A button that displays both a caption and a glyph (bitmap icon). Ideal for toolbars and action buttons.
| Property | Type | Default | Description |
cText | String | "BitBtn" | Button caption |
cGlyph | String | "" | Path to glyph bitmap image |
nGlyphAlign | Numeric | 0 | Glyph position: 0=Left, 1=Right, 2=Top, 3=Bottom |
nSpacing | Numeric | 4 | Spacing between glyph and text (pixels) |
nWidth, nHeight | Numeric | 100, 30 | Size |
| Event | Category | Description |
OnClick | Action | Button clicked |
OnEnter | Focus | Control received focus |
OnExit | Focus | Control lost focus |
| Platform | Native Widget |
| Windows | BUTTON (BS_BITMAP | BS_PUSHBUTTON) |
| macOS | NSButton (NSBezelStyleTexturedSquare + image) |
| Linux | GtkButton + GtkImage |
// BitBtn with glyph
@ 10, 10 BITBTN oBtn PROMPT "Save" OF oForm GLYPH "save.bmp" SIZE 100, 30
oBtn:OnClick := { || SaveRecord() }
Flat button designed for toolbars. Can act as a toggle and does not receive focus.
| Property | Type | Default | Description |
cGlyph | String | "" | Glyph bitmap path |
lFlat | Logical | .T. | Flat appearance (no border until hover) |
lDown | Logical | .F. | Pressed/toggle state |
nGroupIndex | Numeric | 0 | Group for mutual exclusion (0 = none) |
lAllowAllUp | Logical | .F. | Allow all buttons in group to be unpressed |
| Event | Category | Description |
OnClick | Action | Button clicked |
| Platform | Native Widget |
| Windows | BUTTON (BS_OWNERDRAW, flat rendering) |
| macOS | NSButton (NSBezelStyleRoundRect, borderless) |
| Linux | GtkToggleButton (flat relief) |
// Toolbar speed buttons with mutual exclusion
@ 2, 2 SPEEDBTN oBold GLYPH "bold.bmp" OF oToolbar GROUP 1 SIZE 24, 24
@ 2, 28 SPEEDBTN oItalic GLYPH "italic.bmp" OF oToolbar GROUP 1 SIZE 24, 24
TImage CT_IMAGE = 14
Displays a bitmap, JPEG, PNG, or GIF image on a form.
| Property | Type | Default | Description |
cFileName | String | "" | Path to image file |
lStretch | Logical | .F. | Stretch image to fit control |
lProportional | Logical | .F. | Maintain aspect ratio when stretching |
lCenter | Logical | .F. | Center image within control |
nWidth, nHeight | Numeric | 100, 100 | Size |
| Event | Category | Description |
OnClick | Action | Image clicked |
OnDblClick | Action | Image double-clicked |
| Platform | Native Widget |
| Windows | STATIC (SS_BITMAP | SS_REALSIZECONTROL) |
| macOS | NSImageView |
| Linux | GtkImage |
// Display a logo image
@ 10, 10 IMAGE oLogo FILENAME "logo.png" OF oForm SIZE 200, 80 STRETCH
TShape CT_SHAPE = 15
Draws geometric shapes (rectangle, circle, ellipse, rounded rectangle) on a form.
| Property | Type | Default | Description |
nShape | Numeric | 0 | 0=Rectangle, 1=Circle, 2=Ellipse, 3=RoundRect |
nPenColor | Color | CLR_BLACK | Border color |
nPenWidth | Numeric | 1 | Border thickness |
nBrushColor | Color | CLR_WHITE | Fill color |
| Platform | Native Widget |
| Windows | Owner-drawn STATIC (GDI drawing) |
| macOS | NSView (Core Graphics drawRect:) |
| Linux | GtkDrawingArea (Cairo) |
TBevel CT_BEVEL = 16
Non-interactive decorative control that draws raised or lowered beveled lines and boxes.
| Property | Type | Default | Description |
nStyle | Numeric | 0 | 0=Lowered, 1=Raised |
nBevelShape | Numeric | 0 | 0=Box, 1=TopLine, 2=BottomLine, 3=LeftLine, 4=RightLine |
| Platform | Native Widget |
| Windows | STATIC (SS_ETCHEDHORZ / SS_ETCHEDFRAME) |
| macOS | NSBox (NSBoxSeparator) |
| Linux | GtkSeparator / GtkFrame |
TMaskEdit CT_MASKEDIT = 28
Text input with an input mask that constrains entry format (dates, phone numbers, SSN, etc.).
| Property | Type | Default | Description |
cText | String | "" | Current text content (with literals) |
cMask | String | "" | Input mask (e.g. "999-999-9999") |
lSaveLiterals | Logical | .T. | Include mask literals in value |
cPlaceholder | String | "_" | Placeholder character |
| Event | Category | Description |
OnChange | Action | Text content changed |
OnValidate | Action | Mask validation completed |
OnEnter | Focus | Control received focus |
OnExit | Focus | Control lost focus |
| Platform | Native Widget |
| Windows | EDIT (ES_AUTOHSCROLL + mask logic) |
| macOS | NSTextField + NSFormatter |
| Linux | GtkEntry + input filtering |
// Phone number mask
@ 50, 120 MASKEDIT oPhone MASK "(999) 999-9999" OF oForm SIZE 160, 24
TStringGrid CT_STRINGGRID = 29
Editable grid of cells organized in rows and columns. Suitable for tabular data entry.
| Property | Type | Default | Description |
nColCount | Numeric | 5 | Number of columns |
nRowCount | Numeric | 5 | Number of rows |
nFixedCols | Numeric | 1 | Number of fixed (header) columns |
nFixedRows | Numeric | 1 | Number of fixed (header) rows |
nDefaultColWidth | Numeric | 64 | Default column width |
nDefaultRowHeight | Numeric | 24 | Default row height |
lEditing | Logical | .T. | Allow cell editing |
| Event | Category | Description |
OnSelectCell | Action | Cell selected |
OnSetEditText | Action | Cell text changed |
OnDrawCell | Draw | Custom cell painting |
OnKeyDown | Keyboard | Key pressed in grid |
| Platform | Native Widget |
| Windows | Owner-drawn custom grid (WC_LISTVIEW based) |
| macOS | NSTableView (multi-column editable) |
| Linux | GtkTreeView + GtkListStore (editable) |
// Create a 3-column spreadsheet-like grid
@ 10, 10 STRINGGRID oGrid OF oForm SIZE 400, 200 COLS 3 ROWS 10
oGrid:SetCell( 0, 0, "Product" )
oGrid:SetCell( 0, 1, "Qty" )
oGrid:SetCell( 0, 2, "Price" )
Scrollable container panel. Controls placed inside automatically get scroll bars when they exceed the visible area.
| Property | Type | Default | Description |
lAutoScroll | Logical | .T. | Automatically show scroll bars |
nHorzPos | Numeric | 0 | Horizontal scroll position |
nVertPos | Numeric | 0 | Vertical scroll position |
nWidth, nHeight | Numeric | 200, 200 | Visible area size |
| Event | Category | Description |
OnScroll | Action | Scroll position changed |
OnResize | Layout | Container resized |
| Platform | Native Widget |
| Windows | Window (WS_HSCROLL | WS_VSCROLL) |
| macOS | NSScrollView + NSView |
| Linux | GtkScrolledWindow + GtkViewport |
TStaticText CT_STATICTEXT = 31
Label with a visible border frame. Similar to TLabel but with a sunken, raised, or simple border style.
| Property | Type | Default | Description |
cText | String | "" | Display text |
nBorderStyle | Numeric | 0 | 0=None, 1=Single, 2=Sunken |
nAlignment | Numeric | 0 | 0=Left, 1=Center, 2=Right |
| Platform | Native Widget |
| Windows | STATIC (SS_SUNKEN | SS_LEFT) |
| macOS | NSTextField (bordered, non-editable) |
| Linux | GtkLabel + GtkFrame |
TLabeledEdit CT_LABELEDEDIT = 32
Composite control that combines a TLabel and a TEdit into a single component. Simplifies form layout.
| Property | Type | Default | Description |
cText | String | "" | Edit text content |
cLabelText | String | "Label" | Caption for the label part |
nLabelPosition | Numeric | 0 | 0=Left, 1=Top, 2=Right, 3=Bottom |
nLabelSpacing | Numeric | 3 | Gap between label and edit (pixels) |
lReadOnly | Logical | .F. | Prevent editing |
| Event | Category | Description |
OnChange | Action | Edit text changed |
OnEnter | Focus | Edit received focus |
OnExit | Focus | Edit lost focus |
// Labeled edits for a quick data entry form
@ 20, 20 LABELEDEDIT oName LABEL "Full Name:" OF oForm SIZE 200, 24
@ 50, 20 LABELEDEDIT oEmail LABEL "Email:" OF oForm SIZE 200, 24
10 Additional Controls
These enhanced controls provide graphical elements, masked input, grid editing, and composite
widgets. Available on all platforms using native or owner-drawn rendering.