Native Platform Controls
The Win32 / Cocoa / GTK3 tab provides complex controls that map directly to each platform's advanced native widgets. These controls offer rich functionality with full OS integration.
TTabControl CT_TABCONTROL = 33
Tabbed page container. Each tab hosts a panel of controls, enabling multi-page interfaces.
| Property | Type | Default | Description |
nTabIndex | Numeric | 0 | Currently active tab (0-based) |
nTabCount | Numeric | 0 | Number of tabs (read-only) |
nTabPosition | Numeric | 0 | 0=Top, 1=Bottom, 2=Left, 3=Right |
lHotTrack | Logical | .F. | Highlight tabs on mouse hover |
| Event | Category | Description |
OnChange | Action | Active tab changed |
OnChanging | Action | Tab is about to change (can cancel) |
| Platform | Native Widget |
| Windows | WC_TABCONTROL (SysTabControl32) |
| macOS | NSTabView |
| Linux | GtkNotebook |
// Create a tabbed form
@ 10, 10 TABCONTROL oTab OF oForm SIZE 400, 300
oTab:AddTab( "General" )
oTab:AddTab( "Details" )
oTab:AddTab( "Notes" )
TTreeView CT_TREEVIEW = 20
Hierarchical tree display with expandable/collapsible nodes. Ideal for file browsers, category trees, and organizational charts.
| Property | Type | Default | Description |
lShowLines | Logical | .T. | Show connecting lines between nodes |
lShowButtons | Logical | .T. | Show expand/collapse buttons |
lCheckBoxes | Logical | .F. | Show checkboxes next to items |
lSorted | Logical | .F. | Auto-sort nodes alphabetically |
oSelected | TreeNode | NIL | Currently selected node |
| Event | Category | Description |
OnChange | Action | Selected node changed |
OnExpanding | Action | Node about to expand |
OnCollapsing | Action | Node about to collapse |
OnDblClick | Action | Node double-clicked |
OnEdited | Action | Node label edited |
| Platform | Native Widget |
| Windows | WC_TREEVIEW (SysTreeView32) |
| macOS | NSOutlineView |
| Linux | GtkTreeView (tree model) |
// Build a category tree
@ 10, 10 TREEVIEW oTree OF oForm SIZE 200, 300
oRoot := oTree:AddItem( "Products" )
oRoot:AddChild( "Electronics" )
oRoot:AddChild( "Clothing" )
oRoot:Expand()
TListView CT_LISTVIEW = 21
Multi-column list with icons. Supports icon, small icon, list, and detail/report view modes.
| Property | Type | Default | Description |
nViewStyle | Numeric | 3 | 0=Icon, 1=SmallIcon, 2=List, 3=Report |
lGridLines | Logical | .F. | Show grid lines in report view |
lCheckBoxes | Logical | .F. | Show checkboxes |
lMultiSelect | Logical | .F. | Allow multiple selection |
nSortColumn | Numeric | -1 | Column to sort by (-1 = none) |
| Event | Category | Description |
OnSelectItem | Action | Item selected |
OnDblClick | Action | Item double-clicked |
OnColumnClick | Action | Column header clicked (for sorting) |
OnEdited | Action | Item label edited |
| Platform | Native Widget |
| Windows | WC_LISTVIEW (SysListView32) |
| macOS | NSTableView (multi-column) |
| Linux | GtkTreeView + GtkListStore |
TProgressBar CT_PROGRESSBAR = 22
Visual indicator of operation progress. Supports determinate (percentage) and indeterminate (marquee) modes.
| Property | Type | Default | Description |
nMin | Numeric | 0 | Minimum value |
nMax | Numeric | 100 | Maximum value |
nPosition | Numeric | 0 | Current progress value |
lMarquee | Logical | .F. | Indeterminate (animated) mode |
| Platform | Native Widget |
| Windows | PROGRESS_CLASS (msctls_progress32) |
| macOS | NSProgressIndicator |
| Linux | GtkProgressBar |
// Progress bar for file processing
@ 200, 20 PROGRESSBAR oProgress OF oForm SIZE 300, 20 RANGE 0, 100
oProgress:nPosition := 45
TRichEdit CT_RICHEDIT = 23
Rich text editor supporting bold, italic, underline, colors, fonts, and paragraph formatting (RTF).
| Property | Type | Default | Description |
cText | String | "" | Plain text content |
cRTFText | String | "" | Rich text (RTF) content |
lReadOnly | Logical | .F. | Prevent editing |
lWordWrap | Logical | .T. | Wrap long lines |
nSelStart | Numeric | 0 | Selection start position |
nSelLength | Numeric | 0 | Selection length |
| Event | Category | Description |
OnChange | Action | Content changed |
OnSelChange | Action | Selection changed |
OnKeyDown | Keyboard | Key pressed |
| Platform | Native Widget |
| Windows | RICHEDIT_CLASS (RichEdit20W) |
| macOS | NSTextView (RTF enabled) |
| Linux | GtkTextView (with Pango markup) |
TTrackBar CT_TRACKBAR = 34
Slider control for selecting a numeric value within a range. Used for volume, zoom, and similar adjustments.
| Property | Type | Default | Description |
nMin | Numeric | 0 | Minimum value |
nMax | Numeric | 100 | Maximum value |
nPosition | Numeric | 0 | Current slider position |
nTickFreq | Numeric | 1 | Tick mark frequency |
lHorizontal | Logical | .T. | Horizontal orientation |
| Event | Category | Description |
OnChange | Action | Slider position changed |
| Platform | Native Widget |
| Windows | TRACKBAR_CLASS (msctls_trackbar32) |
| macOS | NSSlider |
| Linux | GtkScale |
TUpDown CT_UPDOWN = 35
Spin button (up/down arrows) typically paired with an edit control for numeric input.
| Property | Type | Default | Description |
nMin | Numeric | 0 | Minimum value |
nMax | Numeric | 100 | Maximum value |
nPosition | Numeric | 0 | Current value |
nIncrement | Numeric | 1 | Step increment |
oBuddy | Control | NIL | Associated edit control |
lWrap | Logical | .F. | Wrap from max to min |
| Event | Category | Description |
OnChange | Action | Value changed (up/down clicked) |
| Platform | Native Widget |
| Windows | UPDOWN_CLASS (msctls_updown32) |
| macOS | NSStepper |
| Linux | GtkSpinButton |
TDateTimePicker CT_DATETIMEPICKER = 36
Date and/or time picker with a dropdown calendar. Provides locale-aware formatting.
| Property | Type | Default | Description |
dValue | Date | Date() | Selected date/time |
dMinDate | Date | NIL | Minimum selectable date |
dMaxDate | Date | NIL | Maximum selectable date |
cFormat | String | "" | Custom display format (e.g. "yyyy-MM-dd") |
nKind | Numeric | 0 | 0=Date, 1=Time, 2=DateTime |
| Event | Category | Description |
OnChange | Action | Selected date/time changed |
OnDropDown | Action | Calendar dropdown opened |
OnCloseUp | Action | Calendar dropdown closed |
| Platform | Native Widget |
| Windows | DATETIMEPICK_CLASS (SysDateTimePick32) |
| macOS | NSDatePicker |
| Linux | GtkCalendar + GtkPopover |
// Date picker for invoice date
@ 80, 120 DATETIMEPICKER oDtp OF oForm SIZE 150, 24
oDtp:cFormat := "dd/MM/yyyy"
TMonthCalendar CT_MONTHCALENDAR = 37
Inline monthly calendar control. Displays a full month grid for date selection.
| Property | Type | Default | Description |
dValue | Date | Date() | Selected date |
dMinDate | Date | NIL | Minimum selectable date |
dMaxDate | Date | NIL | Maximum selectable date |
lMultiSelect | Logical | .F. | Allow selecting a date range |
lShowToday | Logical | .T. | Highlight today's date |
| Event | Category | Description |
OnSelect | Action | Date selected |
OnSelChange | Action | Selection range changed |
| Platform | Native Widget |
| Windows | MONTHCAL_CLASS (SysMonthCal32) |
| macOS | NSDatePicker (NSClockAndCalendarDatePickerStyle) |
| Linux | GtkCalendar |
9 Native Platform Controls
These controls use advanced OS-specific widgets for maximum native look and feel.
HarbourBuilder automatically maps each control to the correct widget on Windows (Win32), macOS (Cocoa), and Linux (GTK3).