BrightIdeasSoftware.ObjectListView.HandleColumnWidthChanging C# (CSharp) Method

HandleColumnWidthChanging() protected method

When the column widths are changing, resize the space filling columns
protected HandleColumnWidthChanging ( object sender, ColumnWidthChangingEventArgs e ) : void
sender object
e ColumnWidthChangingEventArgs
return void
        protected virtual void HandleColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e)
        {
            if (this.UpdateSpaceFillingColumnsWhenDraggingColumnDivider && !this.GetColumn(e.ColumnIndex).FillsFreeSpace) {
                // If the width of a column is increasing, resize any space filling columns allowing the extra
                // space that the new column width is going to consume
                int oldWidth = this.GetColumn(e.ColumnIndex).Width;
                if (e.NewWidth > oldWidth)
                    this.ResizeFreeSpaceFillingColumns(this.ClientSize.Width - (e.NewWidth - oldWidth));
                else
                    this.ResizeFreeSpaceFillingColumns();
            }
        }
ObjectListView