Пример #1
0
        /// <summary> Adds a new column style </summary>
        /// <returns> The style object created for this column </returns>
        public CustomGrid_ColumnStyle Add_Column()
        {
            // Create the new column
            CustomGrid_ColumnStyle newColumn = new CustomGrid_ColumnStyle();

            // Configure some defaults
            newColumn.BackColor      = this.Default_Column_Color;
            newColumn.ReadOnly       = this.ReadOnly;
            newColumn.Width          = this.Default_Column_Width;
            newColumn.Text_Alignment = this.Default_Text_Alignment;

            // Add this to the collection
            columns.Add(newColumn);

            // Set the name for the header
            newColumn.Header_Text = "Col" + columns.Count;

            // Return new  object
            return(newColumn);
        }
        /// <summary> Adds a new column style </summary>
        /// <returns> The style object created for this column </returns>
        public CustomGrid_ColumnStyle Add_Column()
        {
            // Create the new column
            CustomGrid_ColumnStyle newColumn = new CustomGrid_ColumnStyle();

            // Configure some defaults
            newColumn.BackColor = this.Default_Column_Color;
            newColumn.ReadOnly = this.ReadOnly;
            newColumn.Width = this.Default_Column_Width;
            newColumn.Text_Alignment = this.Default_Text_Alignment;

            // Add this to the collection
            columns.Add( newColumn );

            // Set the name for the header
            newColumn.Header_Text = "Col" + columns.Count;

            // Return new  object
            return newColumn;
        }