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.

PropertyTypeDefaultDescription
nTabIndexNumeric0Currently active tab (0-based)
nTabCountNumeric0Number of tabs (read-only)
nTabPositionNumeric00=Top, 1=Bottom, 2=Left, 3=Right
lHotTrackLogical.F.Highlight tabs on mouse hover
EventCategoryDescription
OnChangeActionActive tab changed
OnChangingActionTab is about to change (can cancel)
PlatformNative Widget
WindowsWC_TABCONTROL (SysTabControl32)
macOSNSTabView
LinuxGtkNotebook
// 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.

PropertyTypeDefaultDescription
lShowLinesLogical.T.Show connecting lines between nodes
lShowButtonsLogical.T.Show expand/collapse buttons
lCheckBoxesLogical.F.Show checkboxes next to items
lSortedLogical.F.Auto-sort nodes alphabetically
oSelectedTreeNodeNILCurrently selected node
EventCategoryDescription
OnChangeActionSelected node changed
OnExpandingActionNode about to expand
OnCollapsingActionNode about to collapse
OnDblClickActionNode double-clicked
OnEditedActionNode label edited
PlatformNative Widget
WindowsWC_TREEVIEW (SysTreeView32)
macOSNSOutlineView
LinuxGtkTreeView (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.

PropertyTypeDefaultDescription
nViewStyleNumeric30=Icon, 1=SmallIcon, 2=List, 3=Report
lGridLinesLogical.F.Show grid lines in report view
lCheckBoxesLogical.F.Show checkboxes
lMultiSelectLogical.F.Allow multiple selection
nSortColumnNumeric-1Column to sort by (-1 = none)
EventCategoryDescription
OnSelectItemActionItem selected
OnDblClickActionItem double-clicked
OnColumnClickActionColumn header clicked (for sorting)
OnEditedActionItem label edited
PlatformNative Widget
WindowsWC_LISTVIEW (SysListView32)
macOSNSTableView (multi-column)
LinuxGtkTreeView + GtkListStore

TProgressBar CT_PROGRESSBAR = 22

Visual indicator of operation progress. Supports determinate (percentage) and indeterminate (marquee) modes.

PropertyTypeDefaultDescription
nMinNumeric0Minimum value
nMaxNumeric100Maximum value
nPositionNumeric0Current progress value
lMarqueeLogical.F.Indeterminate (animated) mode
PlatformNative Widget
WindowsPROGRESS_CLASS (msctls_progress32)
macOSNSProgressIndicator
LinuxGtkProgressBar
// 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).

PropertyTypeDefaultDescription
cTextString""Plain text content
cRTFTextString""Rich text (RTF) content
lReadOnlyLogical.F.Prevent editing
lWordWrapLogical.T.Wrap long lines
nSelStartNumeric0Selection start position
nSelLengthNumeric0Selection length
EventCategoryDescription
OnChangeActionContent changed
OnSelChangeActionSelection changed
OnKeyDownKeyboardKey pressed
PlatformNative Widget
WindowsRICHEDIT_CLASS (RichEdit20W)
macOSNSTextView (RTF enabled)
LinuxGtkTextView (with Pango markup)

TTrackBar CT_TRACKBAR = 34

Slider control for selecting a numeric value within a range. Used for volume, zoom, and similar adjustments.

PropertyTypeDefaultDescription
nMinNumeric0Minimum value
nMaxNumeric100Maximum value
nPositionNumeric0Current slider position
nTickFreqNumeric1Tick mark frequency
lHorizontalLogical.T.Horizontal orientation
EventCategoryDescription
OnChangeActionSlider position changed
PlatformNative Widget
WindowsTRACKBAR_CLASS (msctls_trackbar32)
macOSNSSlider
LinuxGtkScale

TUpDown CT_UPDOWN = 35

Spin button (up/down arrows) typically paired with an edit control for numeric input.

PropertyTypeDefaultDescription
nMinNumeric0Minimum value
nMaxNumeric100Maximum value
nPositionNumeric0Current value
nIncrementNumeric1Step increment
oBuddyControlNILAssociated edit control
lWrapLogical.F.Wrap from max to min
EventCategoryDescription
OnChangeActionValue changed (up/down clicked)
PlatformNative Widget
WindowsUPDOWN_CLASS (msctls_updown32)
macOSNSStepper
LinuxGtkSpinButton

TDateTimePicker CT_DATETIMEPICKER = 36

Date and/or time picker with a dropdown calendar. Provides locale-aware formatting.

PropertyTypeDefaultDescription
dValueDateDate()Selected date/time
dMinDateDateNILMinimum selectable date
dMaxDateDateNILMaximum selectable date
cFormatString""Custom display format (e.g. "yyyy-MM-dd")
nKindNumeric00=Date, 1=Time, 2=DateTime
EventCategoryDescription
OnChangeActionSelected date/time changed
OnDropDownActionCalendar dropdown opened
OnCloseUpActionCalendar dropdown closed
PlatformNative Widget
WindowsDATETIMEPICK_CLASS (SysDateTimePick32)
macOSNSDatePicker
LinuxGtkCalendar + 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.

PropertyTypeDefaultDescription
dValueDateDate()Selected date
dMinDateDateNILMinimum selectable date
dMaxDateDateNILMaximum selectable date
lMultiSelectLogical.F.Allow selecting a date range
lShowTodayLogical.T.Highlight today's date
EventCategoryDescription
OnSelectActionDate selected
OnSelChangeActionSelection range changed
PlatformNative Widget
WindowsMONTHCAL_CLASS (SysMonthCal32)
macOSNSDatePicker (NSClockAndCalendarDatePickerStyle)
LinuxGtkCalendar
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).

On This Page

TTabControl CT_TABCONTROL = 33 TTreeView CT_TREEVIEW = 20 TListView CT_LISTVIEW = 21 TProgressBar CT_PROGRESSBAR = 22 TRichEdit CT_RICHEDIT = 23 TTrackBar CT_TRACKBAR = 34 TUpDown CT_UPDOWN = 35 TDateTimePicker CT_DATETIMEPICKER = 36 TMonthCalendar CT_MONTHCALENDAR = 37