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.
Each property in the Object Inspector has an associated type that determines how it is edited and stored:
| Type | Description | Example |
|---|---|---|
PT_STRING | Text string | "Hello" |
PT_NUMBER | Numeric value (integer or float) | 120 |
PT_LOGICAL | Boolean (.T. / .F.) | .T. |
PT_COLOR | RGB color value | CLR_RED or "#FF0000" |
PT_FONT | Font descriptor (name, size, style) | "Segoe UI", 10 |
Appearance Properties
These properties control how a control looks on screen — colors, borders, styles, and visual state.
| Property | Type | Description | Available For |
|---|---|---|---|
nBackColor | PT_COLOR | Background color of the control | All visual controls |
nFontColor | PT_COLOR | Text (foreground) color | All controls with text |
cCaption | PT_STRING | Display text on the control | Button, GroupBox, Label, CheckBox, Radio, TabControl, Form |
cValue | PT_STRING | Current value / text content | Edit, Memo, MaskEdit, StaticText, LabeledEdit |
nBorderStyle | PT_NUMBER | Border style (0=none, 1=single, 2=raised, 3=sunken) | Edit, Memo, GroupBox, Panel, Bevel, ScrollBox |
lBorder | PT_LOGICAL | Show a visible border around the control | Form, Panel, ScrollBox, GroupBox |
nBevelWidth | PT_NUMBER | Width of the bevel edge in pixels | Bevel, Panel, GroupBox |
nBevelStyle | PT_NUMBER | Bevel style (0=none, 1=raised, 2=sunken) | Bevel, Panel |
lFlat | PT_LOGICAL | Use flat appearance instead of 3D | Button, SpeedBtn, BitBtn |
nAlignment | PT_NUMBER | Text alignment (0=left, 1=center, 2=right) | Label, Edit, Memo, Button, StaticText |
nTextAlignment | PT_NUMBER | Text alignment within the control bounds | Label, StaticText |
nImageIndex | PT_NUMBER | Index of the image in the associated image list | Button, BitBtn, SpeedBtn, Image, TabControl, TreeView, ListView |
lTransparent | PT_LOGICAL | Control background is transparent | Label, Image, Shape, StaticText, Panel |
nShapeType | PT_NUMBER | Shape to draw (0=rectangle, 1=ellipse, 2=rounded rect, 3=triangle) | Shape |
nPenColor | PT_COLOR | Outline/pen color for shapes | Shape, PaintBox |
nBrushColor | PT_COLOR | Fill color for shapes | Shape, PaintBox |
nPenWidth | PT_NUMBER | Width of the pen/stroke in pixels | Shape, PaintBox |
nPenStyle | PT_NUMBER | Pen style (0=solid, 1=dash, 2=dot, 3=dash-dot) | Shape, PaintBox |
cHint | PT_STRING | Tooltip text shown on mouse hover | All visual controls |
nProgress | PT_NUMBER | Current progress value (0 to nMax) | ProgressBar |
nMin | PT_NUMBER | Minimum value for range-based controls | ProgressBar, TrackBar, UpDown, ScrollBar |
nMax | PT_NUMBER | Maximum value for range-based controls | ProgressBar, TrackBar, UpDown, ScrollBar |
nPosition | PT_NUMBER | Current slider/thumb position | TrackBar, ScrollBar |
Position and Size
These properties determine where a control is placed and how large it is.
| Property | Type | Description | Available For |
|---|---|---|---|
nLeft | PT_NUMBER | X coordinate of the control's left edge (pixels from parent's left) | All visual controls |
nTop | PT_NUMBER | Y coordinate of the control's top edge (pixels from parent's top) | All visual controls |
nWidth | PT_NUMBER | Width of the control in pixels | All visual controls |
nHeight | PT_NUMBER | Height of the control in pixels | All visual controls |
lCentered | PT_LOGICAL | Center the form on screen at activation | Form, Dialog |
nClientWidth | PT_NUMBER | Width of the form's client area (excluding borders/title bar) | Form |
nClientHeight | PT_NUMBER | Height of the form's client area | Form |
lResizable | PT_LOGICAL | Whether the form can be resized by the user | Form, Dialog |
nMinWidth | PT_NUMBER | Minimum allowed width when resizing | Form |
nMinHeight | PT_NUMBER | Minimum allowed height when resizing | Form |
Behavior Properties
These properties affect how a control behaves and responds to user interaction.
| Property | Type | Description | Available For |
|---|---|---|---|
lVisible | PT_LOGICAL | Whether the control is visible on screen | All visual controls |
lEnabled | PT_LOGICAL | Whether the control responds to user input | All visual controls |
lReadOnly | PT_LOGICAL | Content cannot be edited by the user (display only) | Edit, Memo, MaskEdit, StringGrid, DBEdit, DBMemo |
lWordWrap | PT_LOGICAL | Wrap text to the next line when it exceeds the control width | Label, Memo, Edit, StaticText, DBMemo |
lMultiLine | PT_LOGICAL | Allow multiple lines of text | Edit, Button |
lPassword | PT_LOGICAL | Mask input characters (password field) | Edit |
lCheck | PT_LOGICAL | Checked state of the control | CheckBox, Radio |
lChecked | PT_LOGICAL | Checked state (alias for lCheck on some controls) | CheckBox |
lSelected | PT_LOGICAL | Whether a list item is selected | ListBox, ComboBox, TreeView, ListView, StringGrid |
nTabIndex | PT_NUMBER | Tab order index (determines focus traversal order) | All focusable controls |
lTabStop | PT_LOGICAL | Whether the control can receive focus via Tab key | All focusable controls |
cMask | PT_STRING | Input mask pattern (e.g., "99/99/9999" for dates) | MaskEdit |
nInterval | PT_NUMBER | Timer interval in milliseconds | Timer |
lRunning | PT_LOGICAL | Whether the timer is currently active | Timer |
nScrollBars | PT_NUMBER | Scrollbar style (0=none, 1=horizontal, 2=vertical, 3=both) | Edit, Memo, ScrollBox, StringGrid, DBGrid, Browse |
lAutoSize | PT_LOGICAL | Automatically size the control to fit its content | Label, Image, StaticText |
lModal | PT_LOGICAL | Whether the form blocks interaction with other windows | Form, Dialog |
Font Properties
Font-related properties control the typography of text displayed on controls.
| Property | Type | Description | Available For |
|---|---|---|---|
cFontName | PT_FONT | Name of the font family (e.g., "Segoe UI", "Arial") | All controls with text |
nFontSize | PT_NUMBER | Font size in points | All controls with text |
lFontBold | PT_LOGICAL | Bold text style | All controls with text |
lFontItalic | PT_LOGICAL | Italic text style | All controls with text |
lFontUnderline | PT_LOGICAL | Underlined text style | All controls with text |
lFontStrikeout | PT_LOGICAL | Strikethrough text style | All controls with text |
oFont | PT_FONT | Complete font object (wraps all font properties) | All controls with text |
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.
| Property | Type | Description | Available For |
|---|---|---|---|
cDataSource | PT_STRING | Name or reference to the data source object | DBEdit, DBMemo, DBComboBox, DBCheckBox, DBText, DBGrid, DBNavigator, Browse |
cDataField | PT_STRING | Field name in the data source to bind to | DBEdit, DBMemo, DBComboBox, DBCheckBox, DBText |
cItems | PT_STRING | Array or list of items (for list-based controls) | ListBox, ComboBox, StringGrid, TreeView, ListView, TabControl |
nColCount | PT_NUMBER | Number of columns in a grid or table control | StringGrid, DBGrid, Browse |
nRowCount | PT_NUMBER | Number of rows in a grid or table control | StringGrid, DBGrid, Browse |
nCol | PT_NUMBER | Current selected column index | StringGrid, DBGrid, Browse |
nRow | PT_NUMBER | Current selected row index | StringGrid, DBGrid, Browse |
nItemIndex | PT_NUMBER | Index of the currently selected item | ListBox, ComboBox, ListView, TreeView, TabControl |
cText | PT_STRING | Text content of the control | Edit, Memo, Label, StaticText, LabeledEdit |
cPrompt | PT_STRING | Label text displayed on the control | Button, CheckBox, Radio, GroupBox |
lHeader | PT_LOGICAL | Show column headers in grid controls | StringGrid, DBGrid, Browse |
cAlias | PT_STRING | Database table alias name | DbfTable, MySQL, MariaDB, PostgreSQL, SQLite, Firebird, SQLServer, Oracle, MongoDB |
cTableName | PT_STRING | Database table name | DbfTable, MySQL, MariaDB, PostgreSQL, SQLite, Firebird, SQLServer, Oracle, MongoDB |
Control-Specific Properties
These properties are unique to specific control types and are not shared broadly.
| Property | Type | Description | Available For |
|---|---|---|---|
nWindowState | PT_NUMBER | Window state (0=normal, 1=minimized, 2=maximized) | Form |
cIcon | PT_STRING | Path to the window icon file | Form |
lMaxButton | PT_LOGICAL | Show the maximize button in the title bar | Form |
lMinButton | PT_LOGICAL | Show the minimize button in the title bar | Form |
lCloseButton | PT_LOGICAL | Show the close button in the title bar | Form |
lSysMenu | PT_LOGICAL | Show the system menu (right-click on title bar) | Form |
nToolBar | PT_NUMBER | Reference to the associated toolbar object | ToolBar |
nStatusBar | PT_NUMBER | Reference to the associated status bar object | StatusBar |
nTabPos | PT_NUMBER | Position of tab labels (0=top, 1=bottom, 2=left, 3=right) | TabControl |
lHotTrack | PT_LOGICAL | Highlight tabs on mouse hover | TabControl |
nStyle | PT_NUMBER | Control style flags (bitmask) | All native controls |
nExStyle | PT_NUMBER | Extended style flags (bitmask) | All native controls |
lDoubleBuffered | PT_LOGICAL | Use double buffering to reduce flicker | PaintBox, StringGrid, ScrollBox |
cFileName | PT_STRING | Selected file path (for dialog controls) | OpenDialog, SaveDialog |
cFilter | PT_STRING | File type filter for dialogs (e.g., "Text files|*.txt") | OpenDialog, SaveDialog |
cApiKey | PT_STRING | API key for AI service authentication | OpenAI, Gemini, Claude, DeepSeek, Grok |
cModel | PT_STRING | AI model identifier (e.g., "gpt-4", "claude-3") | OpenAI, Gemini, Claude, DeepSeek, Grok |
nTimeout | PT_NUMBER | Request timeout in milliseconds | OpenAI, Gemini, Claude, DeepSeek, Grok, HttpClient, WebSocket |
cHost | PT_STRING | Server hostname or IP address | MySQL, MariaDB, PostgreSQL, SQLite, HttpClient, FtpClient, TcpServer, TcpClient, WebServer |
nPort | PT_NUMBER | Network port number | MySQL, MariaDB, PostgreSQL, HttpClient, FtpClient, TcpServer, TcpClient, WebServer, WebSocket |
cUserName | PT_STRING | Username for authentication | MySQL, MariaDB, PostgreSQL, FtpClient, SMTPClient |
cPassword | PT_STRING | Password for authentication | MySQL, MariaDB, PostgreSQL, FtpClient, SMTPClient |
cDatabase | PT_STRING | Database name | MySQL, 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:
- Appearance — Colors, borders, captions, images, hints
- Position — Left, Top, Width, Height
- Behavior — Visible, Enabled, ReadOnly, TabStop
- Font — FontName, FontSize, Bold, Italic, Underline
- Data — Items, DataSource, DataField (for data-aware controls)
- Layout — Anchoring, alignment, docking
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..
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:
Properties that are inherited include:
cFontName,nFontSize,lFontBold,lFontItalic— Font properties cascade downnBackColor— If not explicitly set, the control uses the parent's backgroundlEnabled— Disabling a parent container disables all childrenlVisible— Hiding a parent hides all children
A child control can override any inherited property by setting it explicitly.