Page 1 of 1
Background color
Posted: Wed Dec 28, 2011 4:06 pm
by Extorian
Hello,
When in Draft mode or Web Mode in SRichViewEdit, is there are a way to change the background color fully to a darker color (like in Darkroom and other editors) and switch to white page color when in Layout mode?
I would really appreciate any help you can offer in this regard.
Thank you and kind regards
Extorian
Posted: Sat Dec 31, 2011 8:49 am
by Sergey Tkachenko
TSRichViewEdit has a special property for changing page background color: SRichViewEdit.BackgroundProperty.GlobalPageBackgroundColor.
It overrides SRichViewEdit.RichViewEdit.Color and, unlike this property, is not saved to RVF.
I made a test in the ActionTest demo (not a tabbed, but with a single editor): in dmActionSRV.pas, I processed ActionList1.OnExecute:
Code: Select all
procedure TsrvActionsResource.ActionList1Execute(Action: TBasicAction;
var Handled: Boolean);
begin
if Action=srvActionLayoutWeb1 then
Form3.SRichViewEdit1.BackgroundProperty.GlobalPageBackgroundColor := clYellow
else if (Action=srvActionLayoutDraft1) or (Action=srvActionLayoutPrint1) then
Form3.SRichViewEdit1.BackgroundProperty.GlobalPageBackgroundColor := clWhite;
end;
It works as expected (if you test it with the default readme.rvf, do not forget to remove a background image).
Posted: Sat Dec 31, 2011 9:44 am
by Extorian
Hi Sergey,
Thank you for the reply.
The code works fine but in web mode only a 1 inch band at the top is converted to yellow instead of the full white area being yellow.
Is it possible to have the full white area in a different color in web mode?
Thanks and kind regards,
Extorian
Posted: Sat Dec 31, 2011 12:01 pm
by Sergey Tkachenko
I am afraid this color is hard-coded.
It will be fixed in the next update - a page color will be used.
Posted: Sat Dec 31, 2011 12:48 pm
by Extorian
Thanks Sergey,
I look forward to it.
Thanks and kind regards,
Extorian