[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'EditBtn' (#lcl)

# TCustomControlFilterEdit

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Base class for edit controls which filter data in an associated control like TListbox or TTreeview.

## Declaration

Source position: editbtn.pas line 227

`type TCustomControlFilterEdit = class(TCustomEditButton)`
`protected`
`fAlreadyFiltered: Boolean;`
`fIsFirstUpdate: Boolean;` |  | Flag indicating if the filter has ever been applied.
`fNeedUpdate: Boolean;` |  | Flag which indicates that the filter has been updated and needs to be applied.
`fSelectedPart: TObject;` |  | Node to select during the next update.
`fOnFilterItem: TFilterItemEvent;` |  | Stores the event handler in the OnFilterItem property.
`fOnFilterItemEx: TFilterItemExEvent;` |  | Stores the event handler in the OnFilterItemEx property.
`fOnCheckItem: TCheckItemEvent;` |  | Stores the event handler in the OnCheckItem property.
`procedure DestroyWnd; override;` |  | Ensures that the Canvas for the control is freed before the window handle is destroyed.
`procedure InternalSetFilter();` |  | Performs actions needed when a new value is assigned to the Filter property.
`function DoDefaultFilterItem(); virtual;` |  | Provides a default routine used to examine an item in the filtered edit control.
`function DoFilterItem(); virtual;` |  | Filters items using the handlers for the control.
`procedure EditKeyDown(); override;` |  | Handles a KeyDown event for the Edit control.
`procedure EditChange; override;` |  | Performs actions needed when the Edit for the control is changed.
`procedure BuddyClick; override;` |  | Performs actions when the Button for the control is clicked.
`procedure SortAndFilter; virtual; abstract;` |  | Sorts the data in the associated control and applies the filter.
`procedure ApplyFilterCore; virtual; abstract;` |  | Applies the Filter data to the container component.
`procedure MoveNext(); virtual; abstract;` |  | Moves to the next value matching the filter for the control.
`procedure MovePrev(); virtual; abstract;` |  | Moves to the previous value matching the filter for the control.
`procedure MovePageUp(); virtual; abstract;` |  | Moves one page of previous values matching the filter.
`procedure MovePageDown(); virtual; abstract;` |  | Moves one page of subsequent values matching the filter.
`procedure MoveHome(); virtual; abstract;` |  | Moves to the first value matching the filter.
`procedure MoveEnd(); virtual; abstract;` |  | Moves to the last value matching the filter.
`function ReturnKeyHandled; virtual; abstract;` |  | Indicates whether an assigned OnKeyPress event handler handles the Return or Enter key in the KeyDown method for the Edit.
`function GetDefaultGlyphName; override;` |  | Gets the name of the default glyph resource used for the Button on the control.
`class procedure WSRegisterClass; override;` |  | Registers the class reference used to create new instances of the class.
`public`
`constructor Create(); override;` |  | Constructor for the class instance.
`destructor Destroy; override;` |  | Destructor for the class instance.
`procedure InvalidateFilter;` |  | Sets flags and property to indicate that the filter must be reapplied for the control.
`procedure ResetFilter;` |  | Clears the Filter text to show all items in the control.
`function ForceFilter();` |  | Applies a new Filter immediately without waiting for an idle state.
`procedure StoreSelection; virtual; abstract;` |  | Stores the current selection for the associated control in the class instance.
`procedure RestoreSelection; virtual; abstract;` |  | Restores the selection in the associated control after the filter is applied.
`property Filter: string; [rw]` |  | Contains the textual used to select the visible items in the associated control.
`property FilterLowercase: string; [r]` |  | The textual representation for the Filter using lowercase characters.
`property IdleConnected: Boolean; [rw]` |  | Indicates if the asynchronous event handler routine is enabled for the Application.
`property SortData: Boolean; [rw]` |  | Indicates whether items are sorted as they are filtered.
`property SelectedPart: TObject; [rw]` |  | For retaining selection in the filtered control. The actual type depends on the associated control.
`published`
`property CharCase: TEditCharCase;` |  | Controls case conversion performed for a value entered in the control.
`property FilterOptions: TFilterStringOptions; [rw]` |  | Contains options which control string comparisons using the Filter for the control.
`property OnAfterFilter: TNotifyEvent; [rw]` |  | Event handler signalled after all items have been filtered in the control.
`property OnFilterItem: TFilterItemEvent; [rw] deprecated ;` |  | An event handler to give extra conditions for filtering, in addition to the default behavior. Returns True if the passes the filter.
`property OnFilterItemEx: TFilterItemExEvent; [rw]` |  | Event handler signalled to filter data in the control using its caption or item data.
`property OnCheckItem: TCheckItemEvent; [rw]` |  | Has effect when items in the filtered container can be checked. Typically a CheckListbox.
`property ButtonCaption: TCaption;` |  | Contains the caption used for the Button on the edit control.
`property ButtonCursor: TCursor;` |  | Cursor shape displayed when the mouse hovers over the Button in the control.
`property ButtonHint: TTranslateString;` |  | Text displayed in the pop-up hint window when the mouse hovers over the button.
`property ButtonOnlyWhenFocused: Boolean;` |  | ButtonOnlyWhenFocused - if True, the SpeedButton only appears when focus is given to the EditButton control.
`property ButtonWidth: Integer;` |  | Width for the TSpeedButton on the edit control.
`property Constraints: TSizeConstraints;` |  | Contains the minimum and maximum Width and Height for the control.
`property DirectInput: Boolean;` |  | Indicates if text can be entered directly into the BaseEditor control.
`property Flat: Boolean;` |  | When True, the SpeedButton has a flat appearance rather than a three-dimensional one.
`property FocusOnButtonClick: Boolean;` |  | Indicates if the focus is changed to the Edit control after the Button is clicked.
`property Align: TAlign;` |  | Specifies the placement of the control on its Parent control.
`property Alignment: TAlignment;` |  | Indicates the text alignment used for the control value.
`property Anchors: TAnchors;` |  | The set of anchor definitions for this control.
`property BidiMode: TBiDiMode;` |  | Indicates whether text controls use in bi-directional reading.
`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 AutoSize: Boolean;` |  | Allows automatic adjustment of the size for the control, according to its content.
`property AutoSelect: Boolean;` |  | Indicates if the text in the control is automatically selected when focus is received.
`property Color: TColor;` |  | The background color for the control.
`property DragCursor: TCursor;` |  | The cursor shape shown during a drag operation.
`property DragMode: TDragMode;` |  | Determines how a drag operation is started for the control.
`property Enabled: Boolean;` |  | Determines whether the control responds to mouse or keyboard input.
`property Font: TFont;` |  | The font to be used for text display in this control.
`property Glyph: TBitmap;` |  | Glyph - the small graphic image on the SpeedButton, which ought to indicate its function.
`property NumGlyphs: Integer;` |  | NumGlyphs - the number of available glyphs.
`property Images: TCustomImageList;` |  | Contains the Images that can be displayed on the Button for the grouped edit control.
`property ImageIndex: TImageIndex;` |  | Ordinal position in Images for the bitmap displayed on the Button control.
`property ImageWidth: Integer;` |  | Specifies the width of the image displayed on the Button control.
`property Layout: TLeftRight;` |  | Controls the alignment of the edit control and its associate.
`property MaxLength: Integer;` |  | Maximum number of characters allowed in the editor for the control.
`property ParentBidiMode: Boolean;` |  | Indicates whether the BiDiMode settings in the Parent control are used.
`property ParentColor: Boolean;` |  | Use the Color from the Parent control, when enabled.
`property ParentFont: Boolean;` |  | Indicates if the Font from the Parent control is used in the control.
`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;` |  | PopupMenu for the control.
`property ReadOnly: Boolean;` |  | Indicates whether the value for the control can be changed.
`property ShowHint: Boolean;` |  | Enables Hint display for the control.
`property Spacing: Integer;` |  | Specifies the number of pixels reserved between the Edit and Button controls when Button is visible.
`property TabOrder: TTabOrder;` |  | 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.
`property Text: TCaption;` |  | String with the text or caption for the control.
`property TextHint: TTranslateString; [s]` |  | Default hint text shown when the Text property is empty for the grouped edit control.
`property Visible: Boolean;` |  | Allows the control, and all of its children, to be displayed or hidden.
`property OnButtonClick: TNotifyEvent;` |  | OnButtonClick - event handler for a mouse click on the SpeedButton.
`property OnChange: TNotifyEvent;` |  | Event handler signalled when the value for the control is changed.
`property OnClick: TNotifyEvent;` |  | Notification handler for mouse clicks.
`property OnContextPopup: TContextPopupEvent;` |  | Invoked when a context-sensitive pop-up menu is requested.
`property OnDblClick: TNotifyEvent;` |  | Event handler signalled when a mouse double click occurs in the control.
`property OnDragDrop: TDragDropEvent;` |  | Event handler signalled when an object is dropped onto the control.
`property OnDragOver: TDragOverEvent;` |  | Event handler signalled when a control is dragged over the control instance.
`property OnEditingDone: TNotifyEvent;` |  | Event handler signalled when editing is completed for the control.
`property OnEndDrag: TEndDragEvent;` |  | Event handler signalled for the end of a drag-drop operation.
`property OnEnter: TNotifyEvent;` |  | Event handler signalled when the control receives focus.
`property OnExit: TNotifyEvent;` |  | Event handler signalled when the control loses focus.
`property OnKeyDown: TKeyEvent;` |  | Event handler signalled for key down keyboard events.
`property OnKeyPress: TKeyPressEvent;` |  | Event handler signalled for character data entered by the user.
`property OnKeyUp: TKeyEvent;` |  | 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 signalled when the mouse pointer is moved in 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 signalled for a downward movement of the mouse wheel.
`property OnMouseWheelUp: TMouseWheelUpDownEvent;` |  | Event handler signalled for an upward movement of the mouse wheel.
`property OnStartDrag: TStartDragEvent;` |  | Event handler signalled for the start of a dragging operation.
`property OnUTF8KeyPress: TUTF8KeyPressEvent;` |  | Handler for a character entered by the user.
`end;`

## Inheritance

`TCustomControlFilterEdit` |  | Base class for edit controls which filter data in an associated control like TListbox or TTreeview.
`TCustomEditButton` |  | TCustomEditButton - base class for TEditButton, an Edit Box with attached Speed Button.
`TCustomAbstractGroupedEdit` |  | Implements a grouped edit control.
`TCustomControl` |  | The base class for windowed controls which paint themselves.
`TWinControl` |  | Implements a windowed control which can contain other child controls.
`TControl` |  | The base class for visible controls.
`TLCLComponent` |  | The base class for LCL components which have an associated widget.
`TComponent`
?
`TObject`

## Description

When the container control is connected to a filter control, the filtering happens automatically as a user enters text. When the filter is empty and does not have focus, it displays the grayed value "(filter)".