Page 1 of 1

Different cell borders

Posted: Mon Apr 15, 2013 10:44 am
by jleg
Hello,

In v4, we could use the properties BorderLeftStyle, BorderBottomSyle,... to set border's style but in V5, how can i set different styles to the borders of a cell using CmdFormat (FStyle is define protected in the class).

I know i can do it if i set the border for a particular cell (ex: XLS[0].Cell[Col, Row].BorderBottomStyle := ...) but i would like to create default formats and use them when needed.

Thanks for your help.

Re: Different cell borders

Posted: Wed Apr 17, 2013 7:47 am
by larsa
Hello

Here is a sample:

Code: Select all

  FXSS.XLS.CmdFormat.BeginEdit(FXSS.XLS[0]);

  XLS.CmdFormat.Border.Color.IndexColor := xcRed;
  XLS.CmdFormat.Border.Style := cbsThick;

  XLS.CmdFormat.Border.Side[cbsTop] := True;
  XLS.CmdFormat.Border.Side[cbsBottom] := True;

  XLS.CmdFormat.Apply(1,3,8,3);

Re: Different cell borders

Posted: Wed Apr 17, 2013 2:09 pm
by jleg
Hello,
It's ok now in 5.10.17, if i'm right, i had the problem in default format.
Thanks again.