|Top Previous Next|
TSRVEdit is a single-line plain-text edit control, with an optional popup list displaying hints (suggestions).
TSRVEdit = class(TSRVEditControl)
Properties and events
This component publishes the following properties inherited from TSRVEditControl:
•SkinSchemeIndex, ScrollBarSkinSchemeIndex, ItemSkinSchemeIndex;
•properties inherited from TWinControl.
New published properties:
New public properties:
New published events:
•OnChange occurs when the text for the edit control may have changed.
•OnEditHints: TSRVEditHintsEvent occurs when a list of hints (suggestions) is about to be displayed.
•OnCloseHints: TFormHintsClose occurs when a list of hints (suggestions) is closed.
TSRVEditHintsEvent = procedure (Sender: TSRVEditControl;
Text: String; EditHints: TStringList; var ItemIndex : Integer) of object;
TFormHintsClose = procedure(Sender: TObject; FormWidth, FormHeight: Integer;
var NewText : String) of object;
Clear deletes all text from the edit control.
ClearSelection removes the selected text from the edit control.
CopyToClipboard copies the selected text in the edit control to the Clipboard.
CutToClipboard copies the selected text in the edit control to the Clipboard and then deletes the selection.
PasteFromClipboard pastes the contents of the Clipboard into edit control, replacing the current selection.
Undo backs out all changes in the undo buffer.
ClearUndo clears the undo buffer so that no changes to the text can be backed out.
BeginUpdate locks redrawing and displaying hints (suggestions), EndUpdate unlocks them.
GetSelTextBuf copies the selected text into a buffer and returns the number of characters copied. SetSelTextBuf replaces the selected text with a null-terminated string.
ShowHints displays a list of hints (suggestions).
A list of suggestions can be displayed on editing or by the method ShowHints. This feature can be temporary blocked using BeginUpdate/EndUpdate.
Suggestions are requested in the event OnEditHints. In this event, you can fill a list of suggestions (EditHints) for the Text, and specify the Index of item to highlight initially.
A height of this list is defined in DropDownHints property.
When a list of suggestions is closed, OnCloseHints event occurs. The parameter NewText contains the chosen suggestion (it is empty if canceled).
If SkinManager is assigned:
ScaleRichView © trichview.com