/// <summary> /// Set all borders /// </summary> /// <param name="FrameWidth">Frame border line width</param> /// <param name="FrameColor">Frame border color</param> /// <param name="GridWidth">Grid borders line width</param> /// <param name="GridColor">Grid line color</param> public void SetAllBorders ( Double FrameWidth, Color FrameColor, Double GridWidth, Color GridColor ) { // set is not allowed if (Parent.Active || TopBorder == null) { throw new ApplicationException("Set bordes after SetColumnWidth and before table is active."); } // define default horizontal borders TopBorder.Set(FrameWidth, FrameColor); BottomBorder.Set(FrameWidth, FrameColor); HeaderHorBorder.Set(FrameWidth, FrameColor); CellHorBorder.Set(GridWidth, GridColor); // vertical border lines HeaderVertBorder[0].Set(FrameWidth, FrameColor); CellVertBorder[0].Set(FrameWidth, FrameColor); for (Int32 Index = 1; Index < Columns; Index++) { HeaderVertBorder[Index].Set(GridWidth, GridColor); CellVertBorder[Index].Set(GridWidth, GridColor); } HeaderVertBorder[Columns].Set(FrameWidth, FrameColor); CellVertBorder[Columns].Set(FrameWidth, FrameColor); return; }
/// <summary> /// Set cell horizontal border line /// </summary> /// <param name="Width">Line width</param> public void SetCellHorBorder ( double Width ) { TestInit(); CellHorBorder.Set(Width, Color.Black); }