Page 1 of 1

table border

Posted: Mon Apr 03, 2023 8:17 am
by ravn
How do I change the table border.
The only thing that changes from this is BorderLightColor
with ActionInsertTable1 do
begin
BorderStyle:= rvtbColor ;
BorderLightColor:= clBlue;
BorderColor:= clRed;
BorderWidth:= 4;
end;

Re: table border

Posted: Mon Apr 03, 2023 9:06 am
by Sergey Tkachenko
BorderLightColor is not used when BorderStyle = rvtbColor. It is used only if BorderStyle = rvtbRaisedColor, or rvtbLoweredColor.
So this code defines red table border.
These settings are applied to new tables that will be inserted by ActionInsertTable1.

Or do you want to modify border of an existing table?

Re: table border

Posted: Mon Apr 03, 2023 11:25 am
by ravn
This should be usable with rvtbColor, but it doesn't change anything. I can change this afterwards but not when creating the table
BorderColor:= clRed;
BorderWidth:= 4;

Re: table border

Posted: Mon Apr 03, 2023 3:34 pm
by Sergey Tkachenko
I added your code in the ActionTest demo, adding "rv" to the action name:

Code: Select all

with rvActionInsertTable1 do
begin
 BorderStyle:= rvtbColor ;
 BorderLightColor:= clBlue;
 BorderColor:= clRed;
 BorderWidth:= 4;
end;
After that, all new tables were inserted with red 4px border, as expected.

Re: table border

Posted: Mon Apr 03, 2023 3:44 pm
by ravn
I have found the reason. This was my own mistake, I regret.