Beispiel #1
0
		public ComboBoxBase() : base()
		{
			store = new StoreBase();
			this.Model = store.ViewModel;
			
			this.ShowAll();
		}
Beispiel #2
0
		public ViewNameIcon() : base()
		{
			upbutton = new Button();
			upbutton.Add( new Image(Stock.GoUp, IconSize.Button) );
			upbutton.Clicked += OnUpClicked;
			downbutton = new Button();			
			downbutton.Add( new Image(Stock.GoDown, IconSize.Button) );
			downbutton.Clicked += OnDownClicked;
			swindow = new ScrolledWindow();
			view = new IconView();
			
			CellRendererPixbuf cellicon= new CellRendererPixbuf();
			CellRendererText celltext = new CellRendererText();
			celltext.Xalign=0.5f;
			view.PackStart(cellicon, false);
			view.SetCellDataFunc(cellicon, CellRenderFunctions.RenderIcon);
			view.PackStart(celltext, false);
			view.SetCellDataFunc(celltext, CellRenderFunctions.RenderName);
			view.SelectionMode = Gtk.SelectionMode.Browse;
			view.SelectionChanged += OnSelectionChanged;
			view.ItemActivated += OnRowActivated;
			swindow.Add(view);
			swindow.HscrollbarPolicy = PolicyType.Never;
			swindow.VscrollbarPolicy = PolicyType.Automatic;
			this.PackStart(upbutton, false, false, 0);
			this.PackStart(swindow, true, true, 0);
			this.PackStart(downbutton, false, false, 0);
			
			store = new StoreBase();
			view.Model=store.ViewModel;
			
			ShowAll();
		}
Beispiel #3
0
		public ViewBase() : base()
		{	
			upbutton = new Button();
			upbutton.Add( new Image(Stock.GoUp, IconSize.Button) );
			upbutton.Clicked += OnUpClicked;
			downbutton = new Button();
			downbutton.Add( new Image(Stock.GoDown, IconSize.Button) );
			downbutton.Clicked += OnDownClicked;
			swindow = new ScrolledWindow();
			treeview = new TreeView();
			treeview.Selection.Changed += OnSelectionChanged;
			treeview.RowActivated += OnRowActivated;
			swindow.Add(treeview);
			this.PackStart(upbutton, false, false, 0);
			this.PackStart(swindow, true, true, 0);
			this.PackStart(downbutton, false, false, 0);
			
			store = new StoreBase();
			treeview.Model=store.ViewModel;
			
			ShowAll();
		}