Removing Selection
Removing Selection
If I select some text (or an entire document) and click in part of the selection, sometimes the selection is removed, but more often it is not. Is there a way to make the selection always be removed?
Edit: I also use a component TRVAPopupMenu with live spell checking. If I right click a mispelled word, it does no display the suggestions provided by the spell checker. In order to make it work correctly, I have added the following code to the OnMouseDown event:
if Button = mbright then
if ve1.GetSelText = '' then
begin
{Simulate mouse move}
Mouse_Event(MOUSEEVENTF_ABSOLUTE or MOUSEEVENTF_LEFTDOWN, x, y, 0, 0);
{Simulate the left mouse button up}
Mouse_Event(MOUSEEVENTF_ABSOLUTE or MOUSEEVENTF_LEFTUP, x, y, 0, 0);
end;
Edit: I also use a component TRVAPopupMenu with live spell checking. If I right click a mispelled word, it does no display the suggestions provided by the spell checker. In order to make it work correctly, I have added the following code to the OnMouseDown event:
if Button = mbright then
if ve1.GetSelText = '' then
begin
{Simulate mouse move}
Mouse_Event(MOUSEEVENTF_ABSOLUTE or MOUSEEVENTF_LEFTDOWN, x, y, 0, 0);
{Simulate the left mouse button up}
Mouse_Event(MOUSEEVENTF_ABSOLUTE or MOUSEEVENTF_LEFTUP, x, y, 0, 0);
end;
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
As for spell checking.
You need to call this code:
one time when the application starts, for example in the initialization section of the main form unit.
You need to call this code:
Code: Select all
RVA_GetRichViewEditFromPopupComponent :=
SRVGetRichViewEditFromPopupComponent;
Thanks for the posts.
1) I am using ScaleRichView version 2.0.3.
2) I had already added the popup code. The popup is shown when I right click a word, the problem is that the correction suggestions are not (unless I simulate a left click, as mentioned.) Anyway, I reported this just for your information, as I already have a work-around.
1) I am using ScaleRichView version 2.0.3.
2) I had already added the popup code. The popup is shown when I right click a word, the problem is that the correction suggestions are not (unless I simulate a left click, as mentioned.) Anyway, I reported this just for your information, as I already have a work-around.
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Sometimes the selection is cleared, sometimes it is not. I have the same problem with the rvaction demo (with scalerichview), but I am not sure e-mailing the source or the executable would be any help, as I have not changed the source.
I have, however, applied the patch to RVECaretMove:
procedure TSclRVRuler.RVECaretMove(Sender: TObject);
var
RemCanUpdate : Boolean;
begin
if not FSRichViewEdit.CanUpdateMargin then
Exit;
UpdateRulerIndents;
UpdateTableEditor;
if PageCurrent <> FSRichViewEdit.CurrentPage then
begin
RemCanUpdate := FSRichViewEdit.CanUpdate;
if RemCanUpdate then
FSRichViewEdit.CanUpdate := FALSE;
Scrolled;
UpdateTableEditor;
if RemCanUpdate <> FSRichViewEdit.CanUpdate then
FSRichViewEdit.CanUpdate := RemCanUpdate;
end;
if Assigned(FRVECaretMove) then
FRVECaretMove(Sender);
end;
I will check it tomorrow it that is what is causing the selection not to be cleared.
I have, however, applied the patch to RVECaretMove:
procedure TSclRVRuler.RVECaretMove(Sender: TObject);
var
RemCanUpdate : Boolean;
begin
if not FSRichViewEdit.CanUpdateMargin then
Exit;
UpdateRulerIndents;
UpdateTableEditor;
if PageCurrent <> FSRichViewEdit.CurrentPage then
begin
RemCanUpdate := FSRichViewEdit.CanUpdate;
if RemCanUpdate then
FSRichViewEdit.CanUpdate := FALSE;
Scrolled;
UpdateTableEditor;
if RemCanUpdate <> FSRichViewEdit.CanUpdate then
FSRichViewEdit.CanUpdate := RemCanUpdate;
end;
if Assigned(FRVECaretMove) then
FRVECaretMove(Sender);
end;
I will check it tomorrow it that is what is causing the selection not to be cleared.