public ListBoxView(ViewBase owner) : base(owner) { Listview = new IkonView(listmodel); mainWidget = Listview; // It appears that the gtkiconview has changed considerably // between gtk2 and gtk3. In the gtk3 world, use of the // set_text_column API is not recommended and in fact it appears // to behave differently to the way it did in gtk2 anyway. // https://bugzilla.gnome.org/show_bug.cgi?id=680953 CellRendererPixbuf imageCell = new CellRendererPixbuf(); Listview.PackStart(imageCell, false); Listview.AddAttribute(imageCell, "pixbuf", 1); CellRenderer cell = new CellRendererText() { WrapMode = Pango.WrapMode.Word }; Listview.PackStart(cell, true); Listview.AddAttribute(cell, "markup", 0); Listview.TooltipColumn = 2; Listview.SelectionMode = SelectionMode.Browse; Listview.ItemOrientation = Gtk.Orientation.Horizontal; Listview.RowSpacing = 0; Listview.ColumnSpacing = 0; Listview.ItemPadding = 0; Listview.SelectionChanged += OnSelectionChanged; Listview.ButtonPressEvent += OnDoubleClick; mainWidget.Destroyed += _mainWidget_Destroyed; }
/// <summary>Constructor</summary> public ListBoxView(ViewBase owner) : base(owner) { listview = new IkonView(listmodel); //listview = new TreeView(listmodel); _mainWidget = listview; listview.MarkupColumn = 0; listview.PixbufColumn = 1; listview.TooltipColumn = 2; listview.SelectionMode = SelectionMode.Browse; listview.Orientation = Gtk.Orientation.Horizontal; listview.RowSpacing = 0; listview.ColumnSpacing = 0; listview.ItemPadding = 0; listview.SelectionChanged += OnSelectionChanged; listview.ButtonPressEvent += OnDoubleClick; _mainWidget.Destroyed += _mainWidget_Destroyed; }
/// <summary>Constructor</summary> public ListBoxView(ViewBase owner) : base(owner) { listview = new IkonView(listmodel); //listview = new TreeView(listmodel); _mainWidget = listview; listview.MarkupColumn = 0; listview.PixbufColumn = 1; listview.TooltipColumn = 2; listview.SelectionMode = SelectionMode.Browse; listview.Orientation = Gtk.Orientation.Horizontal; listview.RowSpacing = 0; listview.ColumnSpacing = 0; listview.ItemPadding = 0; //CellRendererText textRender = new Gtk.CellRendererText(); //TreeViewColumn column = new TreeViewColumn("Values", textRender, "text", 0); //listview.AppendColumn(column); //listview.HeadersVisible = false; //listview.CursorChanged += OnSelectionChanged; listview.SelectionChanged += OnSelectionChanged; listview.ButtonPressEvent += OnDoubleClick; _mainWidget.Destroyed += _mainWidget_Destroyed; }
/// <summary>Constructor</summary> public ListBoxView(ViewBase owner) : base(owner) { listview = new IkonView(listmodel); //listview = new TreeView(listmodel); _mainWidget = listview; listview.TextColumn = 0; listview.PixbufColumn = 1; listview.TooltipColumn = 2; listview.SelectionMode = SelectionMode.Browse; listview.Orientation = Gtk.Orientation.Horizontal; listview.RowSpacing = 0; listview.ColumnSpacing = 0; listview.ItemPadding = 0; //CellRendererText textRender = new Gtk.CellRendererText(); //TreeViewColumn column = new TreeViewColumn("Values", textRender, "text", 0); //listview.AppendColumn(column); //listview.HeadersVisible = false; //listview.CursorChanged += OnSelectionChanged; listview.SelectionChanged += OnSelectionChanged; listview.ButtonPressEvent += OnDoubleClick; _mainWidget.Destroyed += _mainWidget_Destroyed; }