ChLa
asked on
selected in TEdit
How can i test to see if something is selected (highlighted) in a TEdit ? I am using a TEdit for numbers only
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SelectAll is for highlight all text in edit and SelStart is similar to SelLength, it is greater than zero if you select some text in edit and represents start where selecting begins. It is in chars units. Some text is highlighted form SelStart and is long as SelLength.
just to clarify:
SelectAll is a command (procedure/function) to select the whole text in the edit.
SelStart / SelLength are properties to read or write to look, whats selected or to set a selection. hereby points SelStart to the first character in the edit component, that is selected and SelLength tells you how many characters are selected.
copy(MyEdit.Text, MyEdit.SelStart, MyEdit.SelLength) gives you exactly the selected text from a edit box.
cheers,
bold
SelectAll is a command (procedure/function) to select the whole text in the edit.
SelStart / SelLength are properties to read or write to look, whats selected or to set a selection. hereby points SelStart to the first character in the edit component, that is selected and SelLength tells you how many characters are selected.
copy(MyEdit.Text, MyEdit.SelStart, MyEdit.SelLength) gives you exactly the selected text from a edit box.
cheers,
bold
ASKER
I had found SelectAll. What is SelStart ? Why are none of these things explained in the help files ?