CreateCols() public static method

public static CreateCols ( Gtk tv, Gtk store, string name, int verticalPos, bool visible ) : void
tv Gtk
store Gtk
name string
verticalPos int
visible bool
return void
Beispiel #1
0
    protected void prepareHeaders(string [] columnsString)
    {
        treeview.HeadersVisible = true;
        int  i       = 0;
        bool visible = false;

        foreach (string myCol in columnsString)
        {
            if (i < 2)
            {
                UtilGtk.CreateCols(treeview, store, Catalog.GetString(myCol), i++, visible);
            }
            else
            {
                //do it here to use a custom colored Renderer
                Gtk.TreeViewColumn aColumn = new Gtk.TreeViewColumn();
                CellRendererText   aCell   = new CellRendererText();
                aColumn.Title = Catalog.GetString(myCol);
                aColumn.PackStart(aCell, true);
                aColumn.SetCellDataFunc(aCell, new Gtk.TreeCellDataFunc(RenderRestTime));

                aColumn.SortColumnId  = i;
                aColumn.SortIndicator = true;
                aColumn.Visible       = visible;
                treeview.AppendColumn(aColumn);
            }

            if (i == 1)
            {
                store.SetSortFunc(0, UtilGtk.IdColumnCompare);
            }

            visible = true;
        }
    }
Beispiel #2
0
    private void createTreeviewSeries()
    {
        treeviewSerie1Array            = new ArrayList(0);
        store_serie1                   = new TreeStore(typeof(string), typeof(string));
        treeview_serie1.Model          = store_serie1;
        treeview_serie1.HeadersVisible = false;
        UtilGtk.CreateCols(treeview_serie1, store_serie1, "", 0, true);
        UtilGtk.CreateCols(treeview_serie1, store_serie1, "", 1, true);
        treeview_serie1.Selection.Mode = SelectionMode.None;

        treeviewSerie2Array            = new ArrayList(0);
        store_serie2                   = new TreeStore(typeof(string), typeof(string));
        treeview_serie2.Model          = store_serie2;
        treeview_serie2.HeadersVisible = false;
        UtilGtk.CreateCols(treeview_serie2, store_serie2, "", 0, true);
        UtilGtk.CreateCols(treeview_serie2, store_serie2, "", 1, true);
        treeview_serie2.Selection.Mode = SelectionMode.None;

        treeviewSerie3Array            = new ArrayList(0);
        store_serie3                   = new TreeStore(typeof(string), typeof(string));
        treeview_serie3.Model          = store_serie3;
        treeview_serie3.HeadersVisible = false;
        UtilGtk.CreateCols(treeview_serie3, store_serie3, "", 0, true);
        UtilGtk.CreateCols(treeview_serie3, store_serie3, "", 1, true);
        treeview_serie3.Selection.Mode = SelectionMode.None;
    }
    protected void prepareHeaders(string [] columnsString)
    {
        treeview.HeadersVisible = true;
        int  i       = 0;
        bool visible = false;

        foreach (string myCol in columnsString)
        {
            UtilGtk.CreateCols(treeview, store, Catalog.GetString(myCol), i++, visible);
            if (i == 1)
            {
                store.SetSortFunc(0, UtilGtk.IdColumnCompare);
            }
            visible = true;
        }
    }
Beispiel #4
0
    private void createTreeviewLoad()
    {
        store_load = new TreeStore(
            typeof(string), typeof(string), typeof(string), //name, mode, desc
            typeof(string), typeof(string), typeof(string), //serie1 jumps, serie2 jumps, serie3jumps
            typeof(string));                                //uniqueID (hidden)

        treeview_load.Model          = store_load;
        treeview_load.HeadersVisible = true;

        int i = 0;

        UtilGtk.CreateCols(treeview_load, store_load, Catalog.GetString("Name"), i++, true);
        UtilGtk.CreateCols(treeview_load, store_load, Catalog.GetString("Mode"), i++, true);
        UtilGtk.CreateCols(treeview_load, store_load, Catalog.GetString("Description"), i++, true);
        UtilGtk.CreateCols(treeview_load, store_load, "Tests (1)", i++, true);
        UtilGtk.CreateCols(treeview_load, store_load, "Tests (2)", i++, true);
        UtilGtk.CreateCols(treeview_load, store_load, "Tests (3)", i++, true);
        UtilGtk.CreateCols(treeview_load, store_load, "uniqueID", store_load_uniqueID_col, false);

        treeview_load.Selection.Changed += onLoadSelectionEntry;
    }
    private void prepareHeaders(string [] columnsString, bool addCheckbox)
    {
        treeviewRemoveColumns();
        treeview.HeadersVisible = true;
        int  i       = 0;
        bool visible = false;

        foreach (string myCol in columnsString)
        {
            if (addCheckbox && i == 1)
            {
                createCheckboxes(treeview);
            }
            else
            {
                UtilGtk.CreateCols(treeview, store, myCol, i, visible);
            }
//			if(i == 1)	//first columns: ID, is hidden
//				store.SetSortFunc (0, UtilGtk.IdColumnCompare);
            visible = true;
            i++;
        }
    }
Beispiel #6
0
    private void createTreeviewResult(bool by_sets)
    {
        if (by_sets)
        {
            store_result = new TreeStore(typeof(string), typeof(string), typeof(string));                //serie, person, test
        }
        else
        {
            store_result = new TreeStore(typeof(string), typeof(string));                       //person, test
        }
        treeview_result.Model          = store_result;
        treeview_result.HeadersVisible = true;

        int i = 0;

        if (by_sets)
        {
            UtilGtk.CreateCols(treeview_result, store_result, Catalog.GetString("Serie"), i++, true);
        }

        UtilGtk.CreateCols(treeview_result, store_result, Catalog.GetString("Person"), i++, true);
        UtilGtk.CreateCols(treeview_result, store_result, Catalog.GetString("Test"), i++, true);
    }