DefaultMargin

General TRichView support forum. Please post your questions here
Post Reply
standay
Posts: 306
Joined: Fri Jun 18, 2021 3:07 pm

DefaultMargin

Post by standay »

Sergey,

I am trying to set a different left margin in a regular rve. I have to have a controlpanel for other things, but the defaultmargin is stomping all over my leftmargin setting. I've tried all this and nothing works, all I get is whatever the defaultmargin is set to:

Code: Select all

  rveControlPanel.DefaultMargin := 40;

  rve.SetIntProperty(rvipLeftMargin,85);
  rve.DocParameters.LeftMargin := 85;
  rve.LeftMargin := 85;
  rve.TopMargin := 40;
  rve.RightMargin := 40;
  //rve.BottomMargin := 40;
  rve.Reformat;
I don't want to load document settings that would change the margin (at least, I don't think I'm loading any). Is there any way to override the leftmargin size setting with a control panel in use?

Thanks

Stan
standay
Posts: 306
Joined: Fri Jun 18, 2021 3:07 pm

Re: DefaultMargin

Post by standay »

Sergey,

Looks like it's not the presence controlpanel. I put one in my small test app and it was fine. In my "real" app there's a lot of code and I had to fine the right place to put rve.LeftMargin := 85 and it's OK.

Just FYI.

Stan
Sergey Tkachenko
Site Admin
Posts: 17906
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: DefaultMargin

Post by Sergey Tkachenko »

If you want to override default settings of RVAControlPanel, make your changes in rvActionNew.OnNew event.
standay
Posts: 306
Joined: Fri Jun 18, 2021 3:07 pm

Re: DefaultMargin

Post by standay »

Thanks Sergey, I'll try that.

Stan
Post Reply