Hello Sergey,
I work with ScaleRichviewEdit V 9.01 and unfortunately I can't upgrade because then basic things don't work.
It's about two controls, rv (TRichViewEdit) and srv (TSRichViewEdit).
Because I want to optionally switch between the two, rv is integrated externally with srv.ExternalRV := rv. The switching works perfectly.
My question is about the situation where rv is used as an external control of srv, so srv is the current write area.
When a user jumps into srv with a keyboard shortcut, I want the cursor to already be flashing at a certain position.
With rv this is no problem: SetSelectionBounds and then rv.SetFocus.
With srv.SetFocus the cursor does not blink at the set position, it looks like srv does not have the focus. When I check with Screen.ActiveControl, rv is indeed the active control.
How can I set the focus in the srv so that the cursor flashes there?
Best regards
Martin
Setting Focus to ScaleRichView
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Setting Focus to ScaleRichView
Sorry, ExternalRV property never worked properly (maybe except for very early versions of ScaleRichView), and finally it was removed in ScaleRichView v11.
I do not recommend using this property. I you need to switch between editors, copy document from one to another.
I do not recommend using this property. I you need to switch between editors, copy document from one to another.
Re: Setting Focus to ScaleRichView
First I tried with ActiveEditor, but unfortunately OnSpellingCheckEx does not work there, which I need for the integration of the Duden corrector.
I had to 'free' OnSpellingCheckEx at the time with rv, which worked very well. Now I have tried it this way, which unfortunately does not work:
Copying the document is no problem, but without the Duden corrector it is a knock-out criterion.
I had to 'free' OnSpellingCheckEx at the time with rv, which worked very well. Now I have tried it this way, which unfortunately does not work:
Code: Select all
srv.ActiveEditor.OnSpellingCheckEx := rvSpellingCheckEx;
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Setting Focus to ScaleRichView
What does not work exactly?
Does this event exist? (it exists only if the code is compiled with RVLIVESPELLEXEVENT compiler $define).
Or it exists but is not called?
Is there a reason for using this event instead of the standard OnSpellingCheck event?
Does this event exist? (it exists only if the code is compiled with RVLIVESPELLEXEVENT compiler $define).
Or it exists but is not called?
Is there a reason for using this event instead of the standard OnSpellingCheck event?
Re: Setting Focus to ScaleRichView
We need the event because we need the item and position to deactivate errors locally.
But it works anyway, I just overlooked one little thing, as I just found out. It would have been nice with the external rv, because this way I have to introduce a global variable in about 700 places in 50 units ...
Thanks for your help and have a nice weekend!
But it works anyway, I just overlooked one little thing, as I just found out. It would have been nice with the external rv, because this way I have to introduce a global variable in about 700 places in 50 units ...
Thanks for your help and have a nice weekend!
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Setting Focus to ScaleRichView
In the next update, I'll add OnSpellingCheckEx event to TSRichViewEdit.