Page 1 of 1

changing the DBSrichViewEdit - pageProperty - orientation

Posted: Thu Feb 23, 2012 10:39 am
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

Posted: Thu Feb 23, 2012 10:58 am
by alexandreq
I forgot to tell you that both options are true in TRVFOption:

rvfoSaveDocProperties = True
rvfoLoadDocProperties = True

Posted: Thu Feb 23, 2012 4:39 pm
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;

Posted: Thu Feb 23, 2012 4:48 pm
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?

Posted: Fri Feb 24, 2012 4:15 pm
by Sergey Tkachenko
This code does not save changes immediately.
What if you replace Format to table.Post?