Cell borders in default format do not work
Posted: Tue Apr 16, 2013 4:01 pm
Hello,
If you take your FormatCells sample and add the following lines in the btnDefaultFormatClick event, the borders never appear (i use XLS.Version := xvExcel97).
If i comment the "Preset" line, i get the same result (no border).
So what is the way to set borders in default formats ?
Thanks for your help.
If you take your FormatCells sample and add the following lines in the btnDefaultFormatClick event, the borders never appear (i use XLS.Version := xvExcel97).
Code: Select all
// Create second default format.
XLS.CmdFormat.BeginEdit(Nil);
XLS.CmdFormat.Fill.BackgroundColor.RGB := $FF1010;
XLS.CmdFormat.Font.Name := 'Arial';
XLS.CmdFormat.Font.Color.IndexColor := xcWhite;
XLS.CmdFormat.Border.Color.IndexColor := xcBlack; <= line added for testing borders
XLS.CmdFormat.Border.Style := cbsThick; <= line added for testing borders
XLS.CmdFormat.Border.Preset(cbspOutline); <= line added for testing borders
XLS.CmdFormat.AddAsDefault('F2');
So what is the way to set borders in default formats ?
Thanks for your help.