ZForge.Controls.TreeViewAdv.Tree.TreeViewAdv.GetColumnX C# (CSharp) Method

GetColumnX() private method

private GetColumnX ( TreeColumn column ) : int
column TreeColumn
return int
        internal int GetColumnX(TreeColumn column)
        {
            int x = -OffsetX;
            foreach (TreeColumn col in Columns)
            {
                if (col.IsVisible)
                {
                    if (column == col)
                        return x;
                    else
                        x += col.Width;
                }
            }
            return x;
        }

Usage Example

Beispiel #1
0
 public ReorderColumnState(TreeViewAdv tree, TreeColumn column, Point initialMouseLocation)
     : base(tree, column)
 {
     _location   = new Point(initialMouseLocation.X + Tree.OffsetX, 0);
     _dragOffset = tree.GetColumnX(column) - initialMouseLocation.X;
     _ghostImage = column.CreateGhostImage(new Rectangle(0, 0, column.Width, tree.ColumnHeaderHeight), tree.Font);
 }
All Usage Examples Of ZForge.Controls.TreeViewAdv.Tree.TreeViewAdv::GetColumnX
TreeViewAdv