Object Inspector

The Object Inspector is a properties and events editor similar to Delphi and C++Builder. It allows you to visually configure control properties and assign event handlers without writing code manually.

Overview

The Object Inspector has two main tabs:

At the top, a Control Selector ComboBox lets you switch between all controls on the current form.

Quick Access

Select any control in the Form Designer to see its properties in the Object Inspector. Changes you make are instantly reflected in the designer and code.

Properties Tab

Categorized Grid

Properties are organized into categories for easier navigation:

CategoryProperties
AppearancecPrompt, cValue, nWidth, nHeight, nClrPane, nClrText, oFont, cPicture
PositionnLeft, nTop, nWidth, nHeight
BehaviorlVisible, lEnabled, lTabStop, lReadOnly
DatacDataSource, cDataField, nDataType
FontcFontName, nFontSize, lFontBold, lFontItalic

Property Editors

Different property types use different editors:

Property TypeEditorExample
StringText inputControl name, caption text
NumberNumeric inputPosition, size values
LogicalDropdown (.T./.F.)Visible, Enabled
ColorColor pickerBackground, text color
FontFont pickerFont name, size, style
EnumDropdown listBorderStyle, Position, WindowState

Properties with predefined values show dropdown lists:

PropertyValues
nBorderStyle0=bsSizeable, 1=bsSingle, 2=bsNone, 3=bsToolWindow
nPosition0=poDesigned, 1=poCenter, 2=poCenterScreen
nWindowState0=wsNormal, 1=wsMinimized, 2=wsMaximized
nFormStyle0=fsNormal, 1=fsStayOnTop
nCursor0=crDefault, 1=crArrow, 2=crIBeam, 3=crHand, etc.

Events Tab

The Events tab shows all available events for the selected control type. The event list is dynamic and retrieved via UI_GETALLEVENTS from the backend.

Assigning Event Handlers

  1. Double-click an event to auto-generate a handler
  2. Type directly in the event field to assign a code block
  3. Select from existing methods via dropdown
// Double-clicking OnClick generates:
oBtn:OnClick := { || Button1Click() }

METHOD Button1Click() CLASS TForm1
   MsgInfo( "Button clicked!" )
return nil

Common Events

EventFires WhenAvailable For
OnClickUser clicks the controlButton, CheckBox, RadioButton, ListBox, etc.
OnChangeControl value changesEdit, Memo, ComboBox, CheckBox, etc.
OnInitControl is created and initializedAll controls
OnCloseForm is about to closeForm only
OnTimerTimer interval elapsedTimer only
OnKeyDownKey is pressed downAll input controls
OnKeyUpKey is releasedAll input controls
OnKeyPressCharacter key pressedAll input controls
OnMouseDownMouse button pressedAll controls
OnMouseUpMouse button releasedAll controls
OnMouseMoveMouse moves over controlAll controls
OnMouseWheelMouse wheel scrolledAll controls
OnDblClickUser double-clicksAll controls
OnCreateForm is being createdForm only
OnDestroyForm is being destroyedForm only
OnShowForm is shownForm only
OnHideForm is hiddenForm only
OnActivateForm receives focusForm only
OnResizeForm is resizedForm only
OnPaintForm needs repaintingForm only

Property Types (C++ Backend)

In the C++ backend, properties are defined with types:

ConstantValueUsage
PT_STRING1Text properties (name, caption, value)
PT_NUMBER2Numeric properties (position, size, intervals)
PT_LOGICAL3Boolean properties (visible, enabled, checked)
PT_COLOR4Color properties (background, text color)
PT_FONT5Font properties (name, size, style)

Code Examples

Setting Properties via Object Inspector

When you edit properties in the inspector, the generated code looks like:

METHOD CreateForm() CLASS TForm1
   ::cTitle     := "My Application"
   ::nLeft      := 100
   ::nTop       := 170
   ::nWidth     := 640
   ::nHeight    := 480
   ::nPosition  := 2  // poCenterScreen
   ::nWindowState := 0  // wsNormal
return nil

Event Assignment in Code

// Inline code block
oBtn:OnClick := { || MsgInfo( "Hello!" ) }

// Call to method
oBtn:OnClick := { || ::HandleButtonClick() }

METHOD HandleButtonClick() CLASS TForm1
   MsgInfo( "Button was clicked" )
return nil

Tips for Using Object Inspector

  1. Use categories — Expand categories to find properties quickly
  2. Double-click events — Auto-generates handler methods in your class
  3. Use dropdowns for enums — Ensures valid values (BorderStyle, Position, etc.)
  4. Color picker — Click color properties to open the color selector
  5. Control selector — Use the ComboBox at top to switch between controls
  6. Real-time updates — Changes reflect instantly in designer and code
  7. Reset to default — Right-click a property to reset to default value

On This Page

Getting Started Component Palette IDE Features Tutorials Reference Platforms Overview Properties Tab Categorized Grid Property Editors Dropdown Editors for Enumerations Events Tab Assigning Event Handlers Common Events Property Types (C++ Backend) Code Examples Setting Properties via Object Inspector Event Assignment in Code Tips for Using Object Inspector