예제 #1
0
        protected void DateTimeColumnDataHandler(TreeViewColumn column,
                                                 CellRenderer cell, TreeModel model, TreeIter iter)
        {
            DateTime             date     = (DateTime)model.GetValue(iter, column.SortColumnId);
            CellRendererDateTime renderer = (CellRendererDateTime)cell;

            renderer.Text = date.ToString(renderer.Format);
        }
예제 #2
0
        public void AddColumnDateTime(string title, string format, int sortid, int col)
        {
            store.SetSortFunc(col, new TreeIterCompareFunc(DateTimeTreeIterCompareFunc));

            column                  = new TreeViewColumn();
            datetimerenderer        = new CellRendererDateTime();
            datetimerenderer.Format = format == null ? "G" : format;
            column.Title            = title;
            column.SortColumnId     = sortid;
            column.Sizing           = TreeViewColumnSizing.Autosize;
            column.Reorderable      = true;
            column.Resizable        = true;
            column.Expand           = false;
            column.Alignment        = 0.0f;
            column.PackStart(datetimerenderer, true);
            column.SetCellDataFunc(datetimerenderer, new TreeCellDataFunc(DateTimeColumnDataHandler));
            tree.AppendColumn(column);
        }
예제 #3
0
파일: guitools.cs 프로젝트: horga83/gfax
        public void AddColumnDateTime(string title, string format, int sortid, int col)
        {
            store.SetSortFunc(col, new TreeIterCompareFunc(DateTimeTreeIterCompareFunc));

            column = new TreeViewColumn ();
            datetimerenderer = new CellRendererDateTime ();
            datetimerenderer.Format = format == null ? "G" : format;
            column.Title = title;
            column.SortColumnId = sortid;
            column.Sizing = TreeViewColumnSizing.Autosize;
            column.Reorderable = true;
            column.Resizable = true;
            column.Expand = false;
            column.Alignment = 0.0f;
            column.PackStart (datetimerenderer, true);
            column.SetCellDataFunc (datetimerenderer, new TreeCellDataFunc(DateTimeColumnDataHandler));
            tree.AppendColumn(column);
        }