setmarginMM changes behavior

ScaleRichView support and discussion (TRichView add-on for WYSIWYG editing)
Post Reply
MPirnstill
Posts: 18
Joined: Tue May 28, 2013 9:38 am

setmarginMM changes behavior

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
MPirnstill
Posts: 18
Joined: Tue May 28, 2013 9:38 am

Post by MPirnstill »

Where can I download this update?
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Answered in a private message.

Besides, you can re-run the scalerichview installer. It can check for updates.
MPirnstill
Posts: 18
Joined: Tue May 28, 2013 9:38 am

Post by MPirnstill »

Does that mean, for the correction of bug, I just Need to re-install ScaleRichView, but not the others (TRichview, TRichviewActions )
MPirnstill
Posts: 18
Joined: Tue May 28, 2013 9:38 am

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
MPirnstill
Posts: 18
Joined: Tue May 28, 2013 9:38 am

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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'
MPirnstill
Posts: 18
Joined: Tue May 28, 2013 9:38 am

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Can you send me a sample project reproducing this problem?
In my test, neither SetMarginMM nor Format scroll to the end.
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
MPirnstill
Posts: 18
Joined: Tue May 28, 2013 9:38 am

Post 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.
Post Reply