Ejemplo n.º 1
0
        public void UpdateColumn(ListViewColumn col, object handle, ListViewColumnChange change)
        {
            Gtk.TreeViewColumn tc = (Gtk.TreeViewColumn)handle;

            switch (change)
            {
            case ListViewColumnChange.Cells:
                tc.Clear();
                MapColumn(col, tc);
                break;

            case ListViewColumnChange.Title:
                MapTitle(col, tc);
                break;

            case ListViewColumnChange.CanResize:
                tc.Resizable = col.CanResize;
                break;

            case ListViewColumnChange.SortIndicatorVisible:
                tc.SortIndicator = col.SortIndicatorVisible;
                break;

            case ListViewColumnChange.SortDirection:
                tc.SortOrder = (SortType)col.SortDirection;
                break;

            case ListViewColumnChange.SortDataField:
                if (col.SortDataField != null)
                {
                    tc.SortColumnId = col.SortDataField.Index;
                }
                break;

            case ListViewColumnChange.Alignment:
                tc.Alignment = col.Alignment.ToGtkAlignment();
                break;
            }
        }