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

TCustomControlFilterEdit

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

Base class for filter controls which associate to a container control like Listbox or Treeview.

Declaration

Source position: editbtn.pas line 200

type TCustomControlFilterEdit = class(TCustomEditButton) end;

protected

  fNeedUpdate: Boolean;

  fIsFirstUpdate: Boolean;

  fSelectedPart: TObject;

  fOnFilterItem: TFilterItemEvent;

  fOnFilterItemEx: TFilterItemExEvent;

  fOnCheckItem: TCheckItemEvent;

  function DoFilterItem();

  function DoDefaultFilterItem(); virtual;

  procedure DestroyWnd; override;

  procedure EditKeyDown(); override;

  procedure EditChange; override;

  procedure ButtonClick; override;

  procedure SortAndFilter; virtual; abstract;

  procedure ApplyFilter();

  

Filters the data and updates the container.

  procedure ApplyFilterCore; virtual; abstract;

  

Method that actually filters data in the container component. Must be implementation inherited classes.

  procedure MoveNext(); virtual; abstract;

  procedure MovePrev(); virtual; abstract;

  procedure MovePageUp(); virtual; abstract;

  procedure MovePageDown(); virtual; abstract;

  procedure MoveHome(); virtual; abstract;

  procedure MoveEnd(); virtual; abstract;

  function ReturnKeyHandled; virtual; abstract;

  function GetDefaultGlyphName; override;

public

  constructor Create(); override;

  destructor Destroy; override;

  procedure InvalidateFilter;

  

Should be called when data was changed and it must be filtered again.

  procedure ResetFilter;

  

Removes the filter text and shows all items in the container.

  function ForceFilter();

  

Applies a new filter immediately without waiting for idle. Returns the previous filter.

  procedure StoreSelection; virtual; abstract;

  procedure RestoreSelection; virtual; abstract;

  property Filter: string; [rw]

  

The actual filter text.

  property IdleConnected: Boolean; [rw]

  property SortData: Boolean; [rw]

  

Items can be sorted while they are filtered.

  property SelectedPart: TObject; [rw]

  

For retaining selection in the filtered control. The actual type depends on the control.

published

  property OnAfterFilter: TNotifyEvent; [rw]

  

Called after all items are filtered.

  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]

  property OnCheckItem: TCheckItemEvent; [rw]

  

Has effect when items in the filtered container can be checked. Typically a CheckListbox.

  property UseFormActivate: Boolean; [rws] deprecated ;

  property ButtonCaption: TCaption;

  property ButtonCursor: TCursor;

  property ButtonHint: TTranslateString;

  property ButtonOnlyWhenFocused: Boolean;

  property ButtonWidth: Integer;

  property Constraints: TSizeConstraints;

  property DirectInput: Boolean;

  property NumGlyphs: Integer;

  property Flat: Boolean;

  property FocusOnButtonClick: Boolean;

  property Align: TAlign;

  property Anchors: TAnchors;

  property BidiMode: TBiDiMode;

  property BorderSpacing: TControlBorderSpacing;

  property BorderStyle: TBorderStyle;

  property AutoSize: Boolean;

  property AutoSelect: Boolean;

  property Color: TColor;

  property DragCursor: TCursor;

  property DragMode: TDragMode;

  property Enabled: Boolean;

  property Font: TFont;

  property Glyph: TBitmap;

  property Layout: TLeftRight;

  property MaxLength: Integer;

  property ParentBidiMode: Boolean;

  property ParentColor: Boolean;

  property ParentFont: Boolean;

  property ParentShowHint: Boolean;

  property PopupMenu: TPopupMenu;

  property ReadOnly: Boolean;

  property ShowHint: Boolean;

  property Spacing: Integer;

  property TabOrder: TTabOrder;

  property TabStop: Boolean;

  property Visible: Boolean;

  property OnButtonClick: TNotifyEvent;

  property OnChange: TNotifyEvent;

  property OnClick: TNotifyEvent;

  property OnDblClick: TNotifyEvent;

  property OnDragDrop: TDragDropEvent;

  property OnDragOver: TDragOverEvent;

  property OnEditingDone: TNotifyEvent;

  property OnEndDrag: TEndDragEvent;

  property OnEnter: TNotifyEvent;

  property OnExit: TNotifyEvent;

  property OnKeyDown: TKeyEvent;

  property OnKeyPress: TKeyPressEvent;

  property OnKeyUp: TKeyEvent;

  property OnMouseDown: TMouseEvent;

  property OnMouseEnter: TNotifyEvent;

  property OnMouseLeave: TNotifyEvent;

  property OnMouseMove: TMouseMoveEvent;

  property OnMouseUp: TMouseEvent;

  property OnMouseWheel: TMouseWheelEvent;

  property OnMouseWheelDown: TMouseWheelUpDownEvent;

  property OnMouseWheelUp: TMouseWheelUpDownEvent;

  property OnStartDrag: TStartDragEvent;

  property OnUTF8KeyPress: TUTF8KeyPressEvent;

  property Text: TCaption;

  property TextHint: TTranslateString; [s]

Inheritance

TCustomControlFilterEdit

  

Base class for filter controls which associate to a container control like Listbox or Treeview.

|

TCustomEditButton

  

TCustomEditButton - base class for TEditButton, an Edit Box with attached Speed Button

|

TCustomAbstractGroupedEdit

  

|

TCustomControl

  

The base class for windowed controls which paint themselves.

|

TWinControl

  

The base class for controls which can contain other (child) controls.

|

TControl

  

The base class for visible controls.

|

TLCLComponent

  

The base class for LCL components associated with widgets.

|

TComponent

?

TObject

Description

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

The latest version of this document can be found at lazarus-ccr.sourceforge.net.