Class TSearchBar
Unit
Declaration
type TSearchBar = class(TPanel)
Description
This class implements a Mozilla like search bar
You can use it this way:
SearchBar:=TSearchBar.create(self); //replace self with the control which should contain the search bar SearchBar.Parent:=self; //the search bar is automatically placeted at the bottom (align) SearchBar.OnSearch:=SearchBarSearch; //this must be an event handler which is than called whenever something should be searched
Hierarchy
- TPanel
- TSearchBar
Overview
Methods
procedure SetFocus; override; |
|
constructor Create(TheOwner: TComponent); override; |
|
destructor destroy(); override; |
Properties
property SearchText: string read GetSearchText; |
|
property SearchLocation: longint read GetSearchLocation write SetSearchLocation; |
|
property SearchLocations: TStrings read GetSearchLocations; |
|
property Highlighting: boolean read GetHighlighting; |
|
property FindState: TFindState read FFindState write SetFindState; |
|
property OnSearch: TSearchEvent read FOnSearch write FOnSearch; |
|
property OnClose: TNotifyEvent read FOnClose write FOnClose; |
|
property OnShow: TNotifyEvent read FOnShow write FOnShow; |
|
property OnHighlightChanged: TNotifyEvent read FHighlightChanged write FHighlightChanged; |
|
property OnKeyDown; |
|
property SubComponents: TSearchBarSubControls read FSubComponents write SetSubComponents; |
|
property Caption: string read FCaption write SetCaption; |
|
property SearchForwardText: string read FSearchForwardText write SetSearchForwardText; |
|
property SearchBackwardText: string read FsearchBackwardText write SetsearchBackwardText; |
|
property HighlightText: string read FHighlightText write SetHighlightText; |
|
property FoundColor: TColor read FFoundColor write FFoundColor; |
|
property NotFoundColor: TColor read FNotFoundColor write FNotFoundColor; |
|
property NotFoundState: string read FNotFoundState write FNotFoundState; |
|
property LoopAroundState: string read FLoopAroundState write FLoopAroundState; |
Description
Methods
procedure SetFocus; override; |
|
focuses the search text edit |
constructor Create(TheOwner: TComponent); override; |
|
destructor destroy(); override; |
|
Properties
property SearchText: string read GetSearchText; |
|
This is the text to search, entered by the user |
property SearchLocation: longint read GetSearchLocation write SetSearchLocation; |
|
Currently selected combobox item |
property SearchLocations: TStrings read GetSearchLocations; |
|
ComboBox-items |
property Highlighting: boolean read GetHighlighting; |
|
State of the highlight all button |
property FindState: TFindState read FFindState write SetFindState; |
|
Set this to the result of the search operation |
property OnSearch: TSearchEvent read FOnSearch write FOnSearch; |
|
This is called when the text should be searched, e.g. when the user clicks the buttons or types in the edit control |
property OnClose: TNotifyEvent read FOnClose write FOnClose; |
|
This is called when the search bar is closed (close button, or escape key) |
property OnShow: TNotifyEvent read FOnShow write FOnShow; |
|
This is called when the search bar is opened (setvisible/show) |
property OnHighlightChanged: TNotifyEvent read FHighlightChanged write FHighlightChanged; |
|
Called when the highlight button is pressed |
property OnKeyDown; |
|
Typical |
property SubComponents: TSearchBarSubControls read FSubComponents write SetSubComponents; |
|
This is a set specifies which sub components should be created See also |
property Caption: string read FCaption write SetCaption; |
|
Caption of the search bar (needs fscCaption) |
property SearchForwardText: string read FSearchForwardText write SetSearchForwardText; |
|
Caption of the button for forward search (needs fscSearchForward) |
property SearchBackwardText: string read FsearchBackwardText write SetsearchBackwardText; |
|
Caption of the backward button (needs fscSearchBackwards) |
property HighlightText: string read FHighlightText write SetHighlightText; |
|
Caption of the highlight all button (needs fscHighlight) |
property FoundColor: TColor read FFoundColor write FFoundColor; |
|
Background-color of the edit control when the text is found |
property NotFoundColor: TColor read FNotFoundColor write FNotFoundColor; |
|
Background-color of the edit control when the text is not found |
property NotFoundState: string read FNotFoundState write FNotFoundState; |
|
Text to display when the text is not found (needs fscStatus) |
property LoopAroundState: string read FLoopAroundState write FLoopAroundState; |
|
Text to display when the text has only been found after looping around (needs fscStatus) |
Generated by PasDoc 0.16.0.