Hi,
all is in the title
In fact I use SelectCurrentWord and GetSelText to know the value of the current text. The problem with this method is the word is delete.
thank.
How to use GetSelText without delete selected text ?
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Hi,
I want to take the value of the word for a comparaison with database and continu to write.
For exemple, if I do a space in a middle of a word, i would to take his value before do the space and do it after. But if I do SelectCurrentWord, I can go only before or after the word to do the space, and not in the position of the caret before the SelectCurrentWord .
Do you know my problem ?
Thank
I want to take the value of the word for a comparaison with database and continu to write.
For exemple, if I do a space in a middle of a word, i would to take his value before do the space and do it after. But if I do SelectCurrentWord, I can go only before or after the word to do the space, and not in the position of the caret before the SelectCurrentWord .
Do you know my problem ?
Thank
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
For any case,
If you want to store selection, then change selection, then restore selection, use RVGetSelectionEx and RVSetSelectionEx from RVLinear unit.
But it's not necessary to select word to read its value. For example,
function GetCurrentWord(rve: TCustomRichViewEdit): String; from RVGetText.pas returns the current word (the same Unicode function exists in RVGetTextW.pas)
If you want to store selection, then change selection, then restore selection, use RVGetSelectionEx and RVSetSelectionEx from RVLinear unit.
But it's not necessary to select word to read its value. For example,
function GetCurrentWord(rve: TCustomRichViewEdit): String; from RVGetText.pas returns the current word (the same Unicode function exists in RVGetTextW.pas)