Page 1 of 2
Possible Selection Problem
Posted: Mon Oct 26, 2009 9:19 pm
by palmeira
I have received a report that there may be a error when text is selected in TScaleRichView. Although I have not witnessed this problem, I was told that, in some computers, when the user clicks on a word, a text segment is selected (usually up to the end of the word, from the start of the paragraph, sometimes begging in a word of the previous paragraph). I have received screen captures, in case they may be of any help.
Edit: Trying to find out what may be causing this problem, I noticed the right-clicking on a misspelled word to bring up a list of suggestion is not working properly - at first the list is empy, and in the wrong position. I am using TScaleRichView 2.4.1 and TRichView 11.1.1 - I have made some changes in RVUni.pas, in order to avoid some kinds of word breaks.
Posted: Tue Oct 27, 2009 8:23 am
by Sergey Tkachenko
I cannot reproduce the problem with live spelling menu.
Some previous versions of SRichViewEdit had problems with popup menu (it was displayed before moving the caret to the point of right click, not after), but in the last version it was fixed.
Please give the step by step instructions how to reproduce.
Posted: Tue Oct 27, 2009 2:49 pm
by palmeira
As the problem seemed to have something to do with the position of the TRichViewEdit component that was linked to the TScaleRichView, I tried to use an internal TRichViewEdit. The problem is that now I cannot move the cursor clicking on the text.
Edit: I cannot scroll or select using the mouse either.
Edit: When I try to set rvoTagsArePChars to true, it retains the value false. (The same goes for ShowSpecialCharacters, etc).
Posted: Tue Oct 27, 2009 2:58 pm
by palmeira
By the way, is it possible to use an internal TRichViewEdit and an external TRVStyle? I am trying to do it, as the form is created.
Edit: I try to use the Object Inspector to the value, but the selection is not accepted or shown.
Posted: Tue Oct 27, 2009 3:27 pm
by Sergey Tkachenko
Do not use external RichViewEdit for displaying or editing documents. The position of everything is wrong in it. In the newer version, it will be even worse, it will be totally unusable for displaying.
External RichViewEdit can be used (hidden)
- for assigning properties at design time
- for displaying the same document in two SRichViewEdits (in future, currently not tested).
Yes, it is possible using external RVStyle and internal RichViewEdit. For example, tutorial demos work in this way.
Posted: Tue Oct 27, 2009 3:34 pm
by palmeira
I was not using external RichViewEdit for displaying or editing documents. In any case, now I am trying to use an internal RichViewEdit, and have add several additional problems (see posts above).
Posted: Tue Oct 27, 2009 3:38 pm
by Sergey Tkachenko
You said that you cannot assign RVStyle component to SRichViewEdit.ExternalRVStyle property? Sorry, I cannot reproduce this problem.
By the way, why do you need using external RVStyle?
Posted: Tue Oct 27, 2009 3:45 pm
by Sergey Tkachenko
As for other problems, please send me a project reproducing them.
Posted: Tue Oct 27, 2009 5:04 pm
by palmeira
The files have been sent. I simply changed the ActionTest demo, so that TScaleRichView uses the internal TRichView. Try to position the text cursor using the mouse - for me, it does not work.
Posted: Tue Oct 27, 2009 6:02 pm
by Sergey Tkachenko
Not received (if you sent to richview at gmaildotcom or svt at trichviewdotcom).
If your e-mail contained exe in attachment (even zipped), please remove it; exe files are rejected automatically.
BTW, ActionTest already uses internal RichViewEdit. If you changed it for using external RichViewEdit, ScaleRichView will be ok, but this external RichViewEdit will be unusable for editing or displaying documents, as I explained before
Posted: Tue Oct 27, 2009 6:07 pm
by palmeira
To GMail. I am sending the files to the alternative address now.
Edit: Yes, the e-mail was returned because of a zipped executable. I am not using TRichViewEdit either to display or edit text.
Posted: Tue Oct 27, 2009 7:21 pm
by Sergey Tkachenko
Received. I'll answer tomorrow.
Posted: Tue Oct 27, 2009 8:02 pm
by palmeira
I don´t know if the problems are related, but srv.RichViewEdit.InsertRVFFromStreamEd is also not working.
Edit: Neither srv.LoadRVFFromStream; srv.Format;
Posted: Tue Oct 27, 2009 8:17 pm
by Sergey Tkachenko
Your demo contains RichViewEdit1: TRichViewEdit, but it is not used in any way.
The problems with your demo is in empty Options (RVOptions in TSRichViewEdit), RVFOptions, RTFOptions.
Why did you remove all options from these properties?
Specifically, mouse is not working because you excluded rvoAllowSelection from RVOptions.
Clipboard copy command will not work too because you excluded all rvoAutoCopy* options from RVOptions.
Empty RVFOptions may lead to creation of document that cannot be opened later (because it does not contain text and paragraph styles).
Please restore these properties to values default for TSRichViewEdit and change them only if it's really necessary.
Posted: Tue Oct 27, 2009 10:37 pm
by palmeira
Thanks for the diagnostic. Just for the record, I have not removed these properties. Perhaps they were cleared when I removed the link to the external TRichViewEdit.
Edit: I have just checked and, in my machine, all the options of TSRichViewEdit are cleared when the property ExternalRV is cleared. As far as I have been able to test, after removing the external TRichViewEdit and setting most options to the default values, everything is working correctly.