Hi,
I have two ways to change the RVE background. Either RVE.Color or RVE.Backgroundbitmap.
However, to save storage space (I'm saving to database) I don't want to save the Backgroundbitmap with the RVF file (I want to use a link to external file as most backgrounds will be the same), but I DO want to save any change to RVE.Color.
It looks like both of these are saved if RVE.RVFOptions.rvfoSaveBack and rvfoLoadBack are True, but neither are saved if set to false.
Is there any way I can save the background color but not the image? (I'll use my own code to save a link to the background image file, probably in docproperties)
Also, I've noticed if rvfoSaveBack and rvfoLoadBack are true, sometimes assigning RVE.Backgroundbitmap does not work, the background just does not take, but if they are both false it works everytime. Any thoughts on this?
Thanks
Saving Page Background
-
- Site Admin
- Posts: 17534
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Thanks Sergey,
I had thought of doing that, but for my application I would need backward compatibility. So how can I retrieve the RVE.Color of existing documents if rvfoLoadBack is set to false? If there is a way to do that it could solve my problem.
I'm not using DB components (using standard RVE), I have own routine for saving and loading to database via streams, so I don't think .CanChange is required? I'm finding that for some documents that have been loaded when I use the command:
RVE.Backgroundbitmap.loadfromfile(somefile);
For some loaded documents it works fine every time, but for others it is ignored completely, but this only happens if rvfoSaveBack and rvfoLoadBack are true. Weird.
I had thought of doing that, but for my application I would need backward compatibility. So how can I retrieve the RVE.Color of existing documents if rvfoLoadBack is set to false? If there is a way to do that it could solve my problem.
I'm not using DB components (using standard RVE), I have own routine for saving and loading to database via streams, so I don't think .CanChange is required? I'm finding that for some documents that have been loaded when I use the command:
RVE.Backgroundbitmap.loadfromfile(somefile);
For some loaded documents it works fine every time, but for others it is ignored completely, but this only happens if rvfoSaveBack and rvfoLoadBack are true. Weird.
-
- Site Admin
- Posts: 17534
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
It's easy.
The first RVF line is always
-8 1 3
If background is present, it's the second line.
The example of this line is
-7 2 0 0 2 0 3 -2147483643
where the first number (-7) means that this is a record about background.
The last two numbers are ord(BackgroundStyle) (3) and background color (-2147483643).
The first RVF line is always
-8 1 3
If background is present, it's the second line.
The example of this line is
-7 2 0 0 2 0 3 -2147483643
where the first number (-7) means that this is a record about background.
The last two numbers are ord(BackgroundStyle) (3) and background color (-2147483643).