Properties Reference A-Z

This page documents every property available across HarbourBuilder controls. Properties are grouped by category and include the property type (PT_STRING, PT_NUMBER, PT_LOGICAL, PT_COLOR, PT_FONT) and the controls that support each one.

Property Types

Each property in the Object Inspector has an associated type that determines how it is edited and stored:

TypeDescriptionExample
PT_STRINGText string"Hello"
PT_NUMBERNumeric value (integer or float)120
PT_LOGICALBoolean (.T. / .F.).T.
PT_COLORRGB color valueCLR_RED or "#FF0000"
PT_FONTFont descriptor (name, size, style)"Segoe UI", 10

Appearance Properties

These properties control how a control looks on screen — colors, borders, styles, and visual state.

PropertyTypeDescriptionAvailable For
nBackColorPT_COLORBackground color of the controlAll visual controls
nFontColorPT_COLORText (foreground) colorAll controls with text
cCaptionPT_STRINGDisplay text on the controlButton, GroupBox, Label, CheckBox, Radio, TabControl, Form
cValuePT_STRINGCurrent value / text contentEdit, Memo, MaskEdit, StaticText, LabeledEdit
nBorderStylePT_NUMBERBorder style (0=none, 1=single, 2=raised, 3=sunken)Edit, Memo, GroupBox, Panel, Bevel, ScrollBox
lBorderPT_LOGICALShow a visible border around the controlForm, Panel, ScrollBox, GroupBox
nBevelWidthPT_NUMBERWidth of the bevel edge in pixelsBevel, Panel, GroupBox
nBevelStylePT_NUMBERBevel style (0=none, 1=raised, 2=sunken)Bevel, Panel
lFlatPT_LOGICALUse flat appearance instead of 3DButton, SpeedBtn, BitBtn
nAlignmentPT_NUMBERText alignment (0=left, 1=center, 2=right)Label, Edit, Memo, Button, StaticText
nTextAlignmentPT_NUMBERText alignment within the control boundsLabel, StaticText
nImageIndexPT_NUMBERIndex of the image in the associated image listButton, BitBtn, SpeedBtn, Image, TabControl, TreeView, ListView
lTransparentPT_LOGICALControl background is transparentLabel, Image, Shape, StaticText, Panel
nShapeTypePT_NUMBERShape to draw (0=rectangle, 1=ellipse, 2=rounded rect, 3=triangle)Shape
nPenColorPT_COLOROutline/pen color for shapesShape, PaintBox
nBrushColorPT_COLORFill color for shapesShape, PaintBox
nPenWidthPT_NUMBERWidth of the pen/stroke in pixelsShape, PaintBox
nPenStylePT_NUMBERPen style (0=solid, 1=dash, 2=dot, 3=dash-dot)Shape, PaintBox
cHintPT_STRINGTooltip text shown on mouse hoverAll visual controls
nProgressPT_NUMBERCurrent progress value (0 to nMax)ProgressBar
nMinPT_NUMBERMinimum value for range-based controlsProgressBar, TrackBar, UpDown, ScrollBar
nMaxPT_NUMBERMaximum value for range-based controlsProgressBar, TrackBar, UpDown, ScrollBar
nPositionPT_NUMBERCurrent slider/thumb positionTrackBar, ScrollBar

Position and Size

These properties determine where a control is placed and how large it is.

PropertyTypeDescriptionAvailable For
nLeftPT_NUMBERX coordinate of the control's left edge (pixels from parent's left)All visual controls
nTopPT_NUMBERY coordinate of the control's top edge (pixels from parent's top)All visual controls
nWidthPT_NUMBERWidth of the control in pixelsAll visual controls
nHeightPT_NUMBERHeight of the control in pixelsAll visual controls
lCenteredPT_LOGICALCenter the form on screen at activationForm, Dialog
nClientWidthPT_NUMBERWidth of the form's client area (excluding borders/title bar)Form
nClientHeightPT_NUMBERHeight of the form's client areaForm
lResizablePT_LOGICALWhether the form can be resized by the userForm, Dialog
nMinWidthPT_NUMBERMinimum allowed width when resizingForm
nMinHeightPT_NUMBERMinimum allowed height when resizingForm

Behavior Properties

These properties affect how a control behaves and responds to user interaction.

PropertyTypeDescriptionAvailable For
lVisiblePT_LOGICALWhether the control is visible on screenAll visual controls
lEnabledPT_LOGICALWhether the control responds to user inputAll visual controls
lReadOnlyPT_LOGICALContent cannot be edited by the user (display only)Edit, Memo, MaskEdit, StringGrid, DBEdit, DBMemo
lWordWrapPT_LOGICALWrap text to the next line when it exceeds the control widthLabel, Memo, Edit, StaticText, DBMemo
lMultiLinePT_LOGICALAllow multiple lines of textEdit, Button
lPasswordPT_LOGICALMask input characters (password field)Edit
lCheckPT_LOGICALChecked state of the controlCheckBox, Radio
lCheckedPT_LOGICALChecked state (alias for lCheck on some controls)CheckBox
lSelectedPT_LOGICALWhether a list item is selectedListBox, ComboBox, TreeView, ListView, StringGrid
nTabIndexPT_NUMBERTab order index (determines focus traversal order)All focusable controls
lTabStopPT_LOGICALWhether the control can receive focus via Tab keyAll focusable controls
cMaskPT_STRINGInput mask pattern (e.g., "99/99/9999" for dates)MaskEdit
nIntervalPT_NUMBERTimer interval in millisecondsTimer
lRunningPT_LOGICALWhether the timer is currently activeTimer
nScrollBarsPT_NUMBERScrollbar style (0=none, 1=horizontal, 2=vertical, 3=both)Edit, Memo, ScrollBox, StringGrid, DBGrid, Browse
lAutoSizePT_LOGICALAutomatically size the control to fit its contentLabel, Image, StaticText
lModalPT_LOGICALWhether the form blocks interaction with other windowsForm, Dialog

Font Properties

Font-related properties control the typography of text displayed on controls.

PropertyTypeDescriptionAvailable For
cFontNamePT_FONTName of the font family (e.g., "Segoe UI", "Arial")All controls with text
nFontSizePT_NUMBERFont size in pointsAll controls with text
lFontBoldPT_LOGICALBold text styleAll controls with text
lFontItalicPT_LOGICALItalic text styleAll controls with text
lFontUnderlinePT_LOGICALUnderlined text styleAll controls with text
lFontStrikeoutPT_LOGICALStrikethrough text styleAll controls with text
oFontPT_FONTComplete font object (wraps all font properties)All controls with text
Inherited fonts

Controls inherit the font of their parent by default. Set oFont on a form to change the font for all child controls at once, unless a child overrides it with its own font settings.

Data Properties

Properties related to data binding, content, and data-aware controls.

PropertyTypeDescriptionAvailable For
cDataSourcePT_STRINGName or reference to the data source objectDBEdit, DBMemo, DBComboBox, DBCheckBox, DBText, DBGrid, DBNavigator, Browse
cDataFieldPT_STRINGField name in the data source to bind toDBEdit, DBMemo, DBComboBox, DBCheckBox, DBText
cItemsPT_STRINGArray or list of items (for list-based controls)ListBox, ComboBox, StringGrid, TreeView, ListView, TabControl
nColCountPT_NUMBERNumber of columns in a grid or table controlStringGrid, DBGrid, Browse
nRowCountPT_NUMBERNumber of rows in a grid or table controlStringGrid, DBGrid, Browse
nColPT_NUMBERCurrent selected column indexStringGrid, DBGrid, Browse
nRowPT_NUMBERCurrent selected row indexStringGrid, DBGrid, Browse
nItemIndexPT_NUMBERIndex of the currently selected itemListBox, ComboBox, ListView, TreeView, TabControl
cTextPT_STRINGText content of the controlEdit, Memo, Label, StaticText, LabeledEdit
cPromptPT_STRINGLabel text displayed on the controlButton, CheckBox, Radio, GroupBox
lHeaderPT_LOGICALShow column headers in grid controlsStringGrid, DBGrid, Browse
cAliasPT_STRINGDatabase table alias nameDbfTable, MySQL, MariaDB, PostgreSQL, SQLite, Firebird, SQLServer, Oracle, MongoDB
cTableNamePT_STRINGDatabase table nameDbfTable, MySQL, MariaDB, PostgreSQL, SQLite, Firebird, SQLServer, Oracle, MongoDB

Control-Specific Properties

These properties are unique to specific control types and are not shared broadly.

PropertyTypeDescriptionAvailable For
nWindowStatePT_NUMBERWindow state (0=normal, 1=minimized, 2=maximized)Form
cIconPT_STRINGPath to the window icon fileForm
lMaxButtonPT_LOGICALShow the maximize button in the title barForm
lMinButtonPT_LOGICALShow the minimize button in the title barForm
lCloseButtonPT_LOGICALShow the close button in the title barForm
lSysMenuPT_LOGICALShow the system menu (right-click on title bar)Form
nToolBarPT_NUMBERReference to the associated toolbar objectToolBar
nStatusBarPT_NUMBERReference to the associated status bar objectStatusBar
nTabPosPT_NUMBERPosition of tab labels (0=top, 1=bottom, 2=left, 3=right)TabControl
lHotTrackPT_LOGICALHighlight tabs on mouse hoverTabControl
nStylePT_NUMBERControl style flags (bitmask)All native controls
nExStylePT_NUMBERExtended style flags (bitmask)All native controls
lDoubleBufferedPT_LOGICALUse double buffering to reduce flickerPaintBox, StringGrid, ScrollBox
cFileNamePT_STRINGSelected file path (for dialog controls)OpenDialog, SaveDialog
cFilterPT_STRINGFile type filter for dialogs (e.g., "Text files|*.txt")OpenDialog, SaveDialog
cApiKeyPT_STRINGAPI key for AI service authenticationOpenAI, Gemini, Claude, DeepSeek, Grok
cModelPT_STRINGAI model identifier (e.g., "gpt-4", "claude-3")OpenAI, Gemini, Claude, DeepSeek, Grok
nTimeoutPT_NUMBERRequest timeout in millisecondsOpenAI, Gemini, Claude, DeepSeek, Grok, HttpClient, WebSocket
cHostPT_STRINGServer hostname or IP addressMySQL, MariaDB, PostgreSQL, SQLite, HttpClient, FtpClient, TcpServer, TcpClient, WebServer
nPortPT_NUMBERNetwork port numberMySQL, MariaDB, PostgreSQL, HttpClient, FtpClient, TcpServer, TcpClient, WebServer, WebSocket
cUserNamePT_STRINGUsername for authenticationMySQL, MariaDB, PostgreSQL, FtpClient, SMTPClient
cPasswordPT_STRINGPassword for authenticationMySQL, MariaDB, PostgreSQL, FtpClient, SMTPClient
cDatabasePT_STRINGDatabase nameMySQL, MariaDB, PostgreSQL, SQLite, Firebird, SQLServer, Oracle, MongoDB

Setting Properties in Code

Properties can be set in code after a control is created:

local oForm, oBtn, oLabel

DEFINE FORM oForm TITLE "Properties Demo" ;
   SIZE 500, 350 FONT "Segoe UI", 10

--- Set properties on the form ---
oForm:lResizable     := .T.
oForm:lCentered      := .T.
oForm:nBackColor     := CLR_WHITE
oForm:lMaxButton     := .T.
oForm:lMinButton     := .T.

@ 30, 40 LABEL oLabel VALUE "Hello World" ;
   OF oForm SIZE 200, 28

--- Set label properties ---
oLabel:nFontColor   := CLR_BLUE
oLabel:lFontBold     := .T.
oLabel:nAlignment    := 1     /// center
oLabel:cHint         := "This is a label"

@ 70, 40 BUTTON oBtn PROMPT "Click Me" ;
   OF oForm SIZE 130, 32

--- Set button properties ---
oBtn:nBackColor     := CLR_GREEN
oBtn:nFontColor     := CLR_WHITE
oBtn:lFlat          := .T.
oBtn:lTabStop       := .T.
oBtn:nTabIndex      := 0

ACTIVATE FORM oForm CENTERED

Setting Properties in the Object Inspector

In the HarbourBuilder IDE, select any control in the Form Designer and switch to the Properties tab in the Object Inspector. Properties are grouped by category:

Double-click a property value to edit it inline. Color properties show a color picker; font properties open a font dialog; logical properties toggle between .T. and .F..

Live preview

Changes made in the Object Inspector are applied to the Form Designer canvas in real time. You can see the effect of every property change immediately without rebuilding.

Property Inheritance

Controls inherit certain properties from their parent container. The inheritance chain is:

graph TD A["Application defaults"] --> B["TForm / Parent Form"] B --> C["Container (Panel, ScrollBox, GroupBox)"] C --> D["Child Control (Button, Edit, Label, etc.)"] style A fill:#58a6ff,stroke:#388bfd,color:#0d1117 style B fill:#8b5cf6,stroke:#7c3aed,color:#fff style C fill:#f59e0b,stroke:#d97706,color:#0d1117 style D fill:#3fb950,stroke:#2ea043,color:#0d1117

Properties that are inherited include:

A child control can override any inherited property by setting it explicitly.

On This Page

Getting Started Component Palette IDE Features Tutorials Reference Platforms Appearance Properties Position and Size Behavior Properties Font Properties Data Properties Control-Specific Properties Setting Properties in Code Setting Properties in the Object Inspector Property Inheritance