changing the DBSrichViewEdit - pageProperty - orientation

General TRichView support forum. Please post your questions here
Post Reply
alexandreq
Posts: 184
Joined: Wed Jan 18, 2012 6:22 pm

changing the DBSrichViewEdit - pageProperty - orientation

Post by alexandreq »

Hello Sergey,

When I chance this option in DBSrichViewEdit - PageProperty - Orientation from poPortrait to poLandScape, didn't it save the change in my doc (db) so that next time when I open the same doc the doc comes wth my change?

I added a checkbox in my form that only change this:

if ck_orientation.checked = true then
DBSRichViewEdit1.PageProperty.Orientation := poPortrait
else
DBSRichViewEdit1.PageProperty.Orientation := poLandScape

thanks
Alex
alexandreq
Posts: 184
Joined: Wed Jan 18, 2012 6:22 pm

Post by alexandreq »

I forgot to tell you that both options are true in TRVFOption:

rvfoSaveDocProperties = True
rvfoLoadDocProperties = True
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Use the same method as for TDBRichViewEdit

Code: Select all

if DBSRichViewEdit1.RichViewEdit.CanChange then begin
  if ck_orientation.checked = true then 
    DBSRichViewEdit1.PageProperty.Orientation := poPortrait 
  else 
    DBSRichViewEdit1.PageProperty.Orientation := poLandScape 
  DBSRichViewEdit1.RichViewEdit.Change;
  DBSRichViewEdit1.Format;
end;
alexandreq
Posts: 184
Joined: Wed Jan 18, 2012 6:22 pm

Post by alexandreq »

Hi Sergey,

I did it, but the problem persist.

When I close the application, open it again and open my query that brings the doc that I changed the orientation, it doesn't change the page orientation.

For default my page is poPortrait.

Do you think that it can be a bug?
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

This code does not save changes immediately.
What if you replace Format to table.Post?
Post Reply