[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
A visual grid control for editing Key-Value pairs.
Source position: valedit.pas line 120
type TValueListEditor = class(TCustomStringGrid) |
||
protected |
||
class procedure WSRegisterClass; override; |
|
Registers the class type for the widget set. |
procedure SetFixedCols(); override; |
|
Sets the value for the FixedCols property. |
procedure ShowColumnTitles; |
|
Assigns and displays the column titles for the Key and Value columns. |
procedure AdjustRowCount; virtual; |
|
Sets the number of visible rows for the control. |
procedure ColRowExchanged(); override; |
|
Exchanges row values at the specified positions. |
procedure ColRowDeleted(); override; |
|
Performs actions needed when a row is deleted in the control. |
procedure DefineCellsProperty(); override; |
|
Not used in the current implementation. |
procedure InvalidateCachedRow; |
|
Resets the last edited row number for the control. |
procedure GetAutoFillColumnInfo(); override; |
|
Gets the display priority for an auto-fill column. |
function GetEditText(); override; |
|
Gets the value used in the editor for the specified cell. |
function GetCells(); override; |
|
Gets the value in Cells at the specified row and column numbers. |
function GetDefaultEditor(); override; |
|
Gets the editor control for the specified column number. |
function GetRowCount; |
|
Gets the value for the RowCount property. |
procedure KeyDown(); override; |
|
Provides support for special keys used in the control. |
procedure KeyPress(); override; |
|
Handles special key presses for the control. |
procedure LoadContent(); override; |
|
Loads configuration and content from the specified XML configuration file. |
procedure ResetDefaultColWidths; override; |
|
Resets grid columns to their default widths. |
procedure SaveContent(); override; |
|
Saves configuration and content in the control to the specified XML configuration file. |
procedure SetCells(); override; |
|
Sets the value in the Cells property at the specified position. |
procedure SetColCount(); override; |
|
Sets the value for the ColCount property. |
procedure SetEditText(); override; |
|
Sets the cell value at the specified position. |
procedure SetFixedRows(); override; |
|
Sets the value in the FixedRows property. |
procedure SetRowCount(); |
|
Sets the value in the RowCount property. |
procedure Sort(); |
|
Sorts column values in the control. |
procedure TitlesChanged(); |
|
Event handler signalled when TitleCaptions is changed. |
function ValidateEntry(); override; |
|
Validates data entered in a cell in the control. |
public |
||
constructor Create(); override; |
|
Constructor for the class instance. |
destructor Destroy; override; |
|
Destructor for the class instance. |
procedure Clear; |
|
Removes the content in the control. |
procedure DeleteColRow(); |
|
Deletes the column or row at the specified position. |
procedure DeleteRow(); override; |
|
Deletes the row at the specified position. |
procedure DeleteCol(); override; |
|
Prevents column deletion in control. |
function FindRow(); |
|
Locates the row with the specified Key name. |
procedure InsertColRow(); |
|
Inserts a column or a row at the specified position. |
function InsertRow(); |
|
Inserts a row at the specified position. |
procedure InsertRowWithValues(); |
|
Inserts a row with the specified values at the specified position. |
procedure ExchangeColRow(); override; |
|
Swaps the columns or rows at the specified positions. |
function IsEmptyRow(); |
|
Indicates if the specified row is empty. |
procedure LoadFromCSVStream(); override; |
|
Loads the content for the control from the comma-separated values in the specified stream. |
procedure MoveColRow(); |
|
Moves the specified column or row to the new position. |
function RestoreCurrentRow; |
|
Restores pre-editing values in the current row. |
property Modified: Boolean; |
|
Indicates if changes have been made to items in the control. |
property Keys []: string; [rw] |
|
Provides indexed access to Key names in the control. |
property Values []: string; [rw] |
|
Provides indexed access to Values stored in the control. |
|
Provides indexed access to item definitions in the control. |
|
published |
||
|
Specifies the placement of the control on its Parent control. |
|
property AlternateColor: TGraphicsColor; |
|
Color used for the background in alternate rows in the grid. |
|
The set of anchor definitions for this control. |
|
property AutoAdvance: TAutoAdvance; |
|
Direction used when automatically moving the selection to the next selectable cell. |
property AutoEdit: Boolean; |
|
Indicates if edit mode is automatically entered when a cell is selected. |
property BiDiMode: TBiDiMode; |
|
Customization (of text controls) in bidirectional reading environments. |
property BorderSpacing: TControlBorderSpacing; |
|
Determines the inner and outer border spacing for this control. |
property BorderStyle: TBorderStyle; |
|
Indicates the border style displayed around the control. |
property Color: TGraphicsColor; |
|
The background color of the control. |
property Constraints: TSizeConstraints; |
|
Contains the minimum and maximum Width and Height for the control. |
property DefaultColWidth: Integer; |
|
Default width used for newly created grid columns. |
property DefaultDrawing: Boolean; |
|
Indicates if the default drawing mechanism is used to draw the background for cells. |
property DefaultRowHeight: Integer; |
|
Default row height for newly created grid rows. |
property DragCursor: TCursor; |
|
The cursor shape shown while the control is dragged. |
|
The operation when the control is dragged - Drag or Dock. |
|
|
Allows the user to drag the control. |
|
property Enabled: Boolean; |
|
Determines whether the control reacts on mouse or keyboard input. |
property ExtendedSelect: Boolean; |
|
Indicates whether a selection can extend beyond the visible boundary for he grid. |
property FixedColor: TGraphicsColor; |
|
The color used for the fixed cells in the grid. |
property FixedCols: Integer; |
|
The number of fixed columns in the grid. |
property Flat: Boolean; |
|
Indicates if cells are displayed using a Flat appearance. |
|
The font to be used for text display in this control. |
|
property GridLineWidth: Integer; |
|
Width (thickness) for grid lines drawn on the control. |
property HeaderHotZones: TGridZoneSet; |
|
'Hot' zones for cell headers that can be selected, clicked, or ignored. |
property HeaderPushZones: TGridZoneSet; |
|
"Hot" zones for cell headers that have been selected or "pushed" in the grid. |
property MouseWheelOption: TMouseWheelOption; |
|
Sets the mouse wheel behavior for the grid control. |
property ParentBiDiMode: Boolean; |
|
Indicates whether the BiDiMode settings in the Parent control are used. |
property ParentColor: Boolean; |
|
Uses the Color from the Parent control, when enabled. |
property ParentFont: Boolean; |
|
If True, the Font of the control will be the same as the one from the Parent. Default is True. |
property ParentShowHint: Boolean; |
|
If True, the value of ShowHint for the control will be the same as the one from the Parent. Default is True. |
property PopupMenu: TPopupMenu; |
|
A context-sensitive menu that pops up when the right mouse button is clicked over this control. |
property RowCount: Integer; [rw] |
|
Gets the number of rows for the control. |
property ScrollBars: TScrollStyle; |
|
Scrollbars displayed for the grid control. |
property ShowHint: Boolean; |
|
Enables Hint display for the control. |
|
Indicates the navigation order for the control when the user presses the Tab or Shift+Tab key. |
|
property TabStop: Boolean; |
|
Allows the user to navigate to / from the control by pressing the Tab or Shift+Tab keys. |
|
The font used for text in a column title. |
|
property TitleImageList: TImageList; |
|
The list with images displayed in column titles. |
property TitleStyle: TTitleStyle; |
|
The drawing style used for the fixed column titles. |
property UseXORFeatures: Boolean; |
|
When True, the dotted focus rectangle is painted using an XOR raster operation. |
property Visible: Boolean; |
|
Allows the control, and all of its children, to be displayed or hidden. |
property VisibleColCount: Integer; |
|
The number of visible columns in the grid control. |
property VisibleRowCount: Integer; |
|
The number of visible rows in the grid control. |
property OnBeforeSelection: TOnSelectEvent; |
|
Event handler signalled before changing the Selection in the grid control. |
property OnButtonClick: TOnSelectEvent; |
|
Event handler signalled when a button in a column header is clicked. |
property OnChangeBounds: TNotifyEvent; |
|
Event handler signalled when the Bounds of the control have been changed. |
property OnCheckboxToggled: TToggledCheckboxEvent; |
|
Event handler signalled when the value for a Checkbox cell is toggled. |
property OnClick: TNotifyEvent; |
|
Notification handler for mouse clicks. |
property OnColRowDeleted: TGridOperationEvent; |
|
Event handler signalled when a grid column or row is deleted. |
property OnColRowExchanged: TGridOperationEvent; |
|
Event handler signalled when a column or row has been exchanged with another. |
property OnColRowInserted: TGridOperationEvent; |
|
Event handler signalled when a column or row is inserted into the grid. |
property OnColRowMoved: TGridOperationEvent; |
|
Event handler signalled when a column or row in the grid is moved. |
property OnCompareCells: TOnCompareCells; |
|
Event handler signalled to compare the content in cells |
property OnContextPopup: TContextPopupEvent; |
|
Invoked when a context-sensitive pop-up menu is requested. |
property OnDragDrop: TDragDropEvent; |
|
This handler determines the action on an drop onto this control, in a drag-drop operation. |
property OnDragOver: TDragOverEvent; |
|
Event handler for a control being dragged over this control. |
property OnDblClick: TNotifyEvent; |
|
Event Handler for double mouse clicks. |
property OnDrawCell: TOnDrawCell; |
|
Event handler signalled to draw a cell in the grid control. |
property OnEditButtonClick: TNotifyEvent; deprecated ; |
|
Deprecated. |
property OnEditingDone: TNotifyEvent; |
|
Event handler signalled when editing is done. |
property OnEndDock: TEndDragEvent; |
|
Notification handler for the end of a docking operation. |
property OnEndDrag: TEndDragEvent; |
|
Notification handler for the end of a drag operation. |
property OnEnter: TNotifyEvent; |
|
Handler for control receiving the focus. |
property OnExit: TNotifyEvent; |
|
Handler for control loosing the focus; This is a good place for checking the finished user input. |
property OnGetEditMask: TGetEditEvent; |
|
Event handler signalled to get the edit mask used for a grid cell. |
property OnGetEditText: TGetEditEvent; |
|
Event handler signalled to get the value for a cell editor in the grid. |
property OnHeaderClick: THdrEvent; |
|
Event handler signalled when the fixed header for a column or row is clicked. |
property OnHeaderSized: THdrEvent; |
|
Event handler signalled when a column or row header has been re-sized. |
property OnHeaderSizing: THeaderSizingEvent; |
|
Event handler signalled when a column or row header sizing action is performed. |
|
Handler for keyboard key pressed. |
|
property OnKeyPress: TKeyPressEvent; |
|
Handler for a character entered by the user. |
|
Event handler signalled when a key up event has occurred for the control. |
|
property OnMouseDown: TMouseEvent; |
|
Event handler signalled when a mouse down event is handled for the control. |
property OnMouseEnter: TNotifyEvent; |
|
Event handler signalled when the mouse pointer has entered the control. |
property OnMouseLeave: TNotifyEvent; |
|
Event handler signalled when the mouse pointer has left the control. |
property OnMouseMove: TMouseMoveEvent; |
|
Event handler for mouse movement within the control. |
property OnMouseUp: TMouseEvent; |
|
Event handler signalled when a mouse up event is handled for the control. |
property OnMouseWheel: TMouseWheelEvent; |
|
Event handler for mouse wheel turned. |
property OnMouseWheelDown: TMouseWheelUpDownEvent; |
|
Event handler for downward movement of mouse wheel. |
property OnMouseWheelUp: TMouseWheelUpDownEvent; |
|
Event handler for upward movement of the mouse wheel. |
property OnMouseWheelHorz: TMouseWheelEvent; |
|
Event handler for horizontal movements of the mouse wheel. |
property OnMouseWheelLeft: TMouseWheelUpDownEvent; |
|
Event handler for left movements of the mouse wheel. |
property OnMouseWheelRight: TMouseWheelUpDownEvent; |
|
Event handler for right movements of the mouse wheel. |
property OnPickListSelect: TNotifyEvent; |
|
Event handler signalled when an item is selected from a pick list. |
property OnPrepareCanvas: TOnPrepareCanvasEvent; |
|
Event handler signalled to prepare the Canvas for drawing. |
property OnResize: TNotifyEvent; |
|
Notification handler for a resize of the control. |
property OnSelectEditor: TSelectEditorEvent; |
|
Event handler signalled to select a cell Editor for the current cell. |
property OnSelection: TOnSelectEvent; |
|
Event handler signalled when an area is selected in the grid control. |
property OnSelectCell: TOnSelectCellEvent; |
|
Event handler signalled when a grid cell is selected. |
property OnSetEditText: TSetEditEvent; |
|
Event handler signalled when the text in the cell Editor is assigned. |
property OnShowHint: TControlShowHintEvent; |
|
Event handler signalled when a hint window is displayed for the control. |
property OnStartDock: TStartDockEvent; |
|
Event handler for the start of a docking operation. |
property OnStartDrag: TStartDragEvent; |
|
Event handler for the start of a dragging operation. |
property OnTopLeftChanged: TNotifyEvent; |
|
Event handler signalled when the top left cell is changed. |
property OnUserCheckboxBitmap: TUserCheckBoxBitmapEvent; |
|
Event handler signalled to get the user-defined bitmap used for a checkbox cell. |
property OnUTF8KeyPress: TUTF8KeyPressEvent; |
|
Handler for a character entered by the user. |
property OnValidateEntry: TValidateEntryEvent; |
|
Event handler signalled to perform validation for a cell value. |
property DisplayOptions: TDisplayOptions; [rw] |
|
Enables or disables display features and behaviors in the control. |
property DoubleBuffered: Boolean; |
|
Allows to reduce flicker in the painting of the control. |
property DropDownRows: Integer; [rw] |
|
Number of rows displayed for an item with a PickList editor style. |
property KeyOptions: TKeyOptions; [rw] |
|
Controls actions that can be performed for Keys in the control. |
property Options: TGridOptions; [rw] |
|
Specifies the options enabled for the Key-Value grid. |
property Strings: TValueListStrings; [rw] |
|
Stores the keys, values, and item definitions in the control. |
property TitleCaptions: TStrings; [rw] |
|
Title captions used for columns in the control. |
property OnGetPickList: TGetPickListEvent; [rw] |
|
Event handler signalled to load values for the PickList in an item. |
property OnStringsChange: TNotifyEvent; [rw] |
|
Event handler signalled when values in the Strings property are changed. |
property OnStringsChanging: TNotifyEvent; [rw] |
|
Event handler signalled prior to updating the Strings property. |
property OnValidate: TOnValidateEvent; [rw] |
|
Not used in the current implementation. |
end; |
|
A visual grid control for editing Key-Value pairs. |
|
| | ||
|
The base class for TStringGrid. |
|
| | ||
|
The base class for a custom-drawn grid control. |
|
| | ||
|
Implements the base class for grid controls. |
|
| | ||
|
The base class for windowed controls which paint themselves. |
|
| | ||
|
Implements a windowed control which can contain other child controls. |
|
| | ||
|
The base class for visible controls. |
|
| | ||
|
The base class for LCL components which have an associated widget. |
|
| | ||
TObject |
TValueListEditor is a TCustomStringGrid descendant which implements a grid-style editor control for Key-Value pairs. TValueListEditor displays a two column grid where the first column is read-only, and lists the key names. The second column is for editing the associated values for the key names.
TValueListEditor provides properties with the Keys and Values displayed in the rows and columns for the control. The Cells property allows access using the familiar column and row number mechanism used in grid controls. The Strings property allows access to the strings used for the Key and Value in a row.
Remark: | Since version 2.2.0, Keys will no longer allow the name/value separator used in the Strings property to be entered as a value in the Key column. When entered, focus is moved to the Value column. If pasted into the Key column, the value is silently discarded. |
The ItemProps property is used to configure the cell editors used for the Keys and Values. This includes setting the editor style, edit mask, maximum length for the value, a list of selectable pick list values, and a read-only flag. Descriptive text for the Key name can also be stored in the ItemProps.
Features and behavior for the control can be specified using the Options, DisplayOptions, and KeyOptions properties.
TValueListEditor implements methods used to perform editing actions in the control, including:
|
Implements a storage container for items added to TValueListEditor. |
|
|
Represents items in the TValueListEditor control. |
|
|
The base class for TStringGrid. |