Table of Contents

TAdvCustomInspector Class

Abstract ancestor class for inspector controls.

Remarks

TAdvCustomInspector is the ancestor class for visual inspector controls. This component is an abstract one, in the sense that it doesn't implement effective property listing, reading or writing. Its implementation is only at visual/control level.

Syntax

Unit: InspectorControls

TAdvCustomInspector = class(TCustomListBox);

Methods

Name Description
ApplyChanges Updates the property value based on the content of the inplace editor.
CallEditor Executes the custom external editor for the specified property. The editor is called when the end-user double clicks the property editor, or clicks the ellipsis button, and the property has an external editor enabled.
ChangeValue This method is called by the inspector when a property value changes.
Collapse Collapses the subproperties of the specified property.
CreateWnd Inspector overrides this method for internal purposes.
DeselectItem Called by the inspector to indicate that a property has been deselected. It fires the event OnDeselectItem.
DragValue This method is called by the inspector when the end-user is draging a property value in the editor. This happens when the button in the editor is a up/down button, and user clicks the button and drags the mouse up/down.
DrawBorders Draws the borders of the property area.
DrawHorizontal​Separator Draws the horizontal separator line which separates one property from another.
DrawPopupItem Performs drawing of an item of the list box to be displayed as a drop down list when a property is being edited.
DrawPropertyName Draws the property name in inspector control, which correspondes to the left part of the inspector.
DrawProperty​Name​Default Performs the default drawing of the property name in the inspector.
DrawPropertyValue Draws the property value in inspector control, which correspondes to the right part of the inspector.
DrawProperty​Value​Default Performs the default drawing of the property value in the inspector.
DrawVertical​Separator Draws the vertical separator line which divides the name (left) and value (right) sections of a property.
Expand Expands the subproperties of the specified property.
FullUpdateNeeded Sets an internal flag requiring full control repainting when the inspector is updated.
GetAutoApply Indicates if the value of the selected property will be automatically applied.
GetButtonType Retrieves the type of the button to be used in a property editor.
GetData Returns custom general purpose data for the specified property. The inspector doesn't use this information, it's only a way to store custom information related to a property.
GetDefaultIndex Returns the index of the property that should be selected by default by the inspector.
GetEditMask Retrieves the edit mask to be used for a inplace property editor.
GetEnableExternal​Editor Indicates if the specified property has a custom external property editor. If true, then when the property editor is double clicked, the CallEditor method is called, as well the OnCallEditor event, as an opportunity to launch the custom editor.
GetExpandState Returns the current expand state (subproperties are collapsed or expanded) of the specified property.
GetIndent Returns the indentation width to be used in the inspector when displayed subproperties at different levels.
GetInplaceEditorType Retrieves the type of the inplace editor to be used for editing a property.
GetLevel Returns the level of the specified property. Properties can have subproperties, and each subproperty might have its subproperties as well. So, the level indicates the position of the subproperty in this chain.
GetMaxLength Retrieves the maximum value length for the text being typed in a property editor.
GetName Retrieves the name of the specified property. Descendants can override this method to effectively retrieve the name of a property.
GetNameColor Returns the background color to be used when drawing the property name in the inspector.
GetNameFont Returns the font to be used when drawing the property name in the inspector.
GetNextValue Retrieves the next valid value for the specified property.
GetPopupItemWidth Returns the width of the popup list box to be displayed as a drop down list when a property is being edited.
GetReadOnly Indicates the if specified property is read-only.
GetSelectedValue Calls GetValue method.
GetSortValuesList Indicates if the items in the popup list displayed by the property editor are sorted or not. For example, for a color property editor, you might not way to have the color names to be sorted. For a field name property editor, it's nice to have the field names sorted.
GetValue Retrieves the value of the specified property. Descendants can override this method to effectively retrieve the value of a property.
GetValueColor Returns the background color to be used when drawing the property value in the inspector.
GetValueFont Returns the font to be used when drawing the property value in the inspector.
GetValuesList Retrieves a list of valid property values to be displayed in the drop down combo box in the property editor.
For example, a boolean property will receive "false" and "true" values, a color property might receive names of valid colors, and so on.
IgnoreChanges Discard the changes made to the inplace editor, reseting the editor content to the current property value.
Lock Puts the inspector in locked state.
SelectItem Called by the inspector to indicate that a property has been selected. It fires the event OnSelectItem.
SetEditedText Sets the text of the inplace property editor control. This puts the property in editing mode and the text set is selected in the control.
SetSelectionPos Selects a specified property in the inspector.
SetValue Sets the value of the specified property.
Unlock Removes the inspector from locked state.
Update Updates the inspector to reflect the latest changes.
ValidateChar Indicates if the specified key pressed is valid for current editing of selected property.

Properties

Name Description
ButtonType[Index] Retrieves the button type of the inplace editor used to edit the value of the property specified by Index.
CheckBoxes If true, checkboxes are used as property editors for boolean properties. If false, then edit controls are used.
Clicked Informs if the inspector was clicked at the position of inplace editor.
EnableExternal​Editor[​Index] Informs if the property specified by Index has a custom external editor.
ExpandState[Index] Retrieves the expand state for the property specified by Index.
Index Use Index property to know the index of the currently selected property. To select a different property in the inspector, set Index property to the index of the desired property to be selected.
InplaceCheckBox Provides a reference to the inplace checkbox control used to edit boolean property values.
InplaceEdit Provides a reference to the inplace edit control used to edit property values.
InplaceEditor​Type[​Index] Retrieves the type of the inplace editor used to edit the value of the property specified by Index.
ItemCount Contains the number of items being displayed in the inspector.
Locked Informs if the inspector is in the locked state. When the inspector is locked, no visual updates are performed.
Names[Index] Retrieves the name of the property which index is specified by Index.
PaintStyle Use PaintStyle property to set the visual appearance of the inspector control.
PopupOrientation Alignment of popup
ReadOnly[Index] Informs the the property specified by Index is read-only or not.
SelectFirstMatch Use SelectFirstMatch property to select first match of edit in popup and do not SetValue before selection finished. Also cancel a changed edit on key alt+up or up
SelectFirstMatchMode Mode for SelectFirstMatch property.
Splitter Contains the position, in pixels of the internal vertical splitter used to separate property name and value.
Values[Index] Retrieves the value of the property which index is specified by Index.

Events

Name Description
OnCallEditor This event is fired by the inspector when a custom external editor must be executed for a specified property.
OnChangeValue OnChangeValue event is fired whenever a property value is changed by the inspector.
OnCollapse This event is fired when a property has been collapsed (subproperties are hidden).
OnDeselectItem This event is fired when a property is deselected in the inspector.
OnDragValue This event is fired when the end-user is dragging a property value (clicking an up/down button and dragging the mouse)
OnDrawName Use OnDrawName event to perform custom drawing of a property name in the inspector.
OnDrawValue Use OnDrawValue event to perform custom drawing of a property value in the inspector.
OnExpand This event is fired when a property has been expanded (subproperties are displayed).
OnGetAutoApply Use this event to inform if a specified property must have its value auto applied or not when the focus leaves.
OnGetButtonType Use OnGetButtonType event to provide the type of the button to be used in a property editor.
OnGetData Use this event to inform custom data for a specified property.
OnGetEditMask Use this event to provide the edit mask for a property editor.
OnGetEnableExternal​Editor Use this event to inform the inspector if a specified property has a custom external editor.
OnGetExpandState Use this event to provide the inspector with the current expand state (expanded or collapsed) for a specified property.
OnGetInplace​Editor​Type Use this event to provide the type of inplace editor to be used as the property editor.
OnGetLevel Use this event to inform the level of a specified property.
OnGetMaxLength Use this event to provide the maximum text length for a property value when editing the property in the inspector.
OnGetName Use OnGetName event to provide the name of the specified property.
OnGetNameColor Use this event to provide the background color of the property name in the inspector.
OnGetNameFont Use this event to provide the font used to display the property name in the inspector.
OnGetNextValue Use OnGetNextValue event to provide the next value of a specified property.
OnGetReadOnly Use this event to inform the inspector if a specified property is read-only or not.
OnGetSelectedValue Not used. Use OnGetValue instead.
OnGetSortValuesList Use this event to specify if the items in the editor's popup list will be sorted or not.
OnGetValue Use OnGetValue event to provide the value of a specified property.
OnGetValueColor Use this event to provide the background color of the property value in the inspector.
OnGetValueFont Use this event to provide the font used to display the property value in the inspector.
OnGetValuesList Use this event to provide a list of values to be used as the popup list in the property editor.
OnSelect OnSelect event is fired when a new property is selected in the inspector.
OnSelectItem This event is fired when a property is selected in the inspector.
OnSetValue OnSetValue is fired as an opportunity for the programmer to set a property value in a custom way.
OnUpdate OnUpdate event is fired after the inspector updates itself due to a call to Update method.
OnValidateChar Use OnValidateChar event to allow or forbid specific keys to be pressed in a property editor.
OnValueDoubleClick This event is fired when the property editor is double clicked in the inspector. You can use this event to disable any action to be performed by the inspector when a double click occurs (like calling a default editor for example).