Page 1 of 1
setmarginMM changes behavior
Posted: Fri Sep 20, 2013 10:48 am
by MPirnstill
Hi,
component was working fine. When I was starting to edit the top of the page was visible.
Then I thought I set different margins from the Program up front. I used the methot setMarginMM. After that, the pages positioned at the bottom, always. When the Programm window was to small, it still showed the bottom of the page, even if I was typing at the top, which was out of sight.
Do I Need to call another Routine to prevent this bottom postion?
I doesn't got to top at all, when I used the setmarginmm.
Posted: Sun Sep 22, 2013 7:25 pm
by Sergey Tkachenko
There is a bug in ScaleRichView 5.7 (wrong initialization of some parameter) that leads to problems with SetMarginMM and scrolling to the caret.
We will upload an update tomorrow.
Posted: Tue Sep 24, 2013 6:41 am
by MPirnstill
Where can I download this update?
Posted: Wed Sep 25, 2013 12:17 pm
by Sergey Tkachenko
Answered in a private message.
Besides, you can re-run the scalerichview installer. It can check for updates.
Posted: Thu Sep 26, 2013 2:38 pm
by MPirnstill
Does that mean, for the correction of bug, I just Need to re-install ScaleRichView, but not the others (TRichview, TRichviewActions )
Posted: Thu Sep 26, 2013 2:51 pm
by MPirnstill
Okay, the scalerichview Installation answered my question.
I Need to install TRichview as well.
But when I try that, it warns me the the CRVData.pas in my installed Version is newer then the file from the new TRichview Version.
Could there be a Version mix up?
I wouldn't want to loose the global variable for the printing of the Special characters.
Posted: Thu Sep 26, 2013 5:35 pm
by Sergey Tkachenko
CRVData.pas - 13.09.2013.
CRVFData.pas - 20.08.2013
I may have a newer version only if you modified it yourself. Probably, you modified value SRVPrintSpecialCharacters in CRVFData.pas
Do not modify TRichView source files. You can assign this variable in your code when your application starts.
Posted: Fri Sep 27, 2013 5:59 am
by MPirnstill
Oh, I did not modify any TRichview source file.
I did set the variable in the sources of my own program.
I did install the new components, but as fas as I can see the bug is still there.
When I use the setMarginMM method the page in the scaledrichview is positioned at the bottom and also when I click into the page for editing it still stay positions at the bottom.
Posted: Fri Sep 27, 2013 2:25 pm
by Sergey Tkachenko
I cannot reproduce this problem.
Make sure that your application is compiled with the newest version of ScaleRichView.
Add the line:
Code: Select all
Application.MessageBox(PChar(SRV_VERSION), '', 0);
It must display '5.7.1'
Posted: Thu Oct 10, 2013 12:08 pm
by MPirnstill
Sorry, had been awas a few days.
Well, I implemented the code line and the Version used is '5.7.1'.
Code: Select all
procedure TfrmMain.RichEditEinstellen;
begin
// TextSyles[0] ist für 'Normaler Text'
RVStyle1.TextStyles[0].FontName := oIniTSP.Fontname;
RVStyle1.TextStyles[0].Size := oIniTSP.Fontsize;
RVStyle1.TextStyles[0].Color := oIniTSP.FontColor;
// Seitenränder
srvText.SetMarginMM(oIniTSP.MarginLeft, oIniTSP.MarginTop,
oIniTSP.MarginRight, oIniTSP.MarginBottom);
//
actSteuerzeichenAnzeigenExecute(self);
srvText.Format; //Settings aktivieren
end;
Sorry, I don't know how to upload Image ín this Forum, so I'm sending them to you thru email.
One Image Shows the Program with use of setMargin and the other without.
The Picture without the use of setMargin is how is should look like.
Only that sometimes I Need different margin Settings.
May be this helps to find the Problem. If you Need anything else please let me know.
Posted: Thu Oct 10, 2013 12:43 pm
by Sergey Tkachenko
Can you send me a sample project reproducing this problem?
In my test, neither SetMarginMM nor Format scroll to the end.
Posted: Fri Oct 11, 2013 8:13 am
by Sergey Tkachenko
I received your demo. The problem is in huge values of margins, for example you set left margin = 2500 mm, i.e. 2.5 meters.
I divided your margin values by 100, and now it works ok.
Posted: Fri Oct 11, 2013 8:28 am
by MPirnstill
I guess the other components I tried before, needed it that way and I didn't realize I had to change it here.
Thank you very much.