コード例 #1
0
        /// <summary>
        /// Set frame border lines
        /// </summary>
        /// <param name="FrameWidth">Frame line width</param>
        /// <param name="FrameColor">Frame line color</param>
        public void SetFrame
        (
            Double FrameWidth,
            Color FrameColor
        )
        {
            // 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.Clear();

            // vertical border lines
            HeaderVertBorder[0].Set(FrameWidth, FrameColor);
            CellVertBorder[0].Set(FrameWidth, FrameColor);
            for (Int32 Index = 1; Index < Columns; Index++)
            {
                HeaderVertBorder[Index].Clear();
                CellVertBorder[Index].Clear();
            }
            HeaderVertBorder[Columns].Set(FrameWidth, FrameColor);
            CellVertBorder[Columns].Set(FrameWidth, FrameColor);
            return;
        }
コード例 #2
0
 /// <summary>
 ///     Set cell horizontal border line
 /// </summary>
 /// <param name="Width">Line width</param>
 public void SetCellHorBorder
 (
     double Width
 )
 {
     TestInit();
     CellHorBorder.Set(Width, Color.Black);
 }
コード例 #3
0
        /// <summary>
        ///     Clear all borders
        /// </summary>
        /// <remarks>
        ///     The table will be displayed with no borders or gris lines.
        /// </remarks>
        public void ClearAllBorders()
        {
            // set is not allowed
            if (Parent.Active || TopBorder == null)
            {
                throw new ApplicationException("Set bordes after SetColumnWidth and before table is active.");
            }

            // clear all horizontal borders
            TopBorder.Clear();
            BottomBorder.Clear();
            HeaderHorBorder.Clear();
            CellHorBorder.Clear();

            // clear all vertical border lines
            for (var Index = 0; Index <= Columns; Index++)
            {
                HeaderVertBorder[Index].Clear();
                CellVertBorder[Index].Clear();
            }
        }
コード例 #4
0
 /// <summary>
 ///     Clear cell horizontal border line
 /// </summary>
 public void ClearCellHorBorder()
 {
     TestInit();
     CellHorBorder.Clear();
 }