当前位置: 首页>>代码示例>>C#>>正文


C# TreeViewColumn.PackStart方法代码示例

本文整理汇总了C#中Gtk.TreeViewColumn.PackStart方法的典型用法代码示例。如果您正苦于以下问题:C# TreeViewColumn.PackStart方法的具体用法?C# TreeViewColumn.PackStart怎么用?C# TreeViewColumn.PackStart使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Gtk.TreeViewColumn的用法示例。


在下文中一共展示了TreeViewColumn.PackStart方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CounterSelectorDialog

		public CounterSelectorDialog ()
		{
			this.Build ();
			
			HasSeparator = false;
			store = new TreeStore (typeof(bool), typeof(string), typeof(CounterCategory), typeof(Counter), typeof(bool));
			treeCounters.Model = store;
			
			TreeViewColumn col = new TreeViewColumn ();
			CellRendererToggle crt = new CellRendererToggle ();
			col.PackStart (crt, false);
			col.AddAttribute (crt, "active", 0);
			col.AddAttribute (crt, "visible", 4);
			
			CellRendererText crx = new CellRendererText ();
			col.PackStart (crx, true);
			col.AddAttribute (crx, "text", 1);
			treeCounters.AppendColumn (col);
			
			foreach (CounterCategory cat in App.Service.GetCategories ())
				AppendCategory (TreeIter.Zero, cat);
			
			UpdateSelectedCounters ();
			treeCounters.ExpandAll ();
			
			crt.Toggled += CrtToggled;
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:27,代码来源:CounterSelectorDialog.cs

示例2: NewTemplateDialog

        public NewTemplateDialog (IEnumerator<ContentItemTemplate> enums)
        {
            Build();

            Title = "New Item";
            var column = new TreeViewColumn ();

            var iconCell = new CellRendererPixbuf ();
            var textCell = new CellRendererText ();
            var textCell2 = new CellRendererText ();

            column.PackStart (iconCell, false);
            column.PackStart (textCell, false);
            column.PackStart (textCell2, false);

            treeview1.AppendColumn (column);

            column.AddAttribute (iconCell,  "pixbuf", 0);
            column.AddAttribute (textCell, "text", 1);
            column.AddAttribute (textCell, "text", 2);

            listStore = new TreeStore (typeof (Gdk.Pixbuf), typeof (string), typeof (string));
            treeview1.Model = listStore;

            items = new List<ContentItemTemplate> ();
            int i = 0;

            while (enums.MoveNext ()) {
                listStore.AppendValues (new Gdk.Pixbuf (System.IO.Path.GetDirectoryName (enums.Current.TemplateFile) + "/" + enums.Current.Icon), enums.Current.Label, i.ToString());
                items.Add (enums.Current);
                i++;
            }
        }
开发者ID:KennethYap,项目名称:MonoGame,代码行数:33,代码来源:NewTemplateDialog.cs

示例3: GacReferencePanel

        public GacReferencePanel(SelectReferenceDialog selectDialog)
        {
            this.selectDialog = selectDialog;

            store = new TreeStore (typeof (string), typeof (string), typeof(string), typeof(bool), typeof(string));
            treeView = new TreeView (store);

            TreeViewColumn firstColumn = new TreeViewColumn ();
            firstColumn.Title = GettextCatalog.GetString ("Reference Name");
            CellRendererToggle tog_render = new CellRendererToggle ();
            tog_render.Toggled += new Gtk.ToggledHandler (AddReference);
            firstColumn.PackStart (tog_render, false);
            firstColumn.AddAttribute (tog_render, "active", 3);

            CellRendererText text_render = new CellRendererText ();
            firstColumn.PackStart (text_render, true);
            firstColumn.AddAttribute (text_render, "text", 0);

            treeView.AppendColumn (firstColumn);
            treeView.AppendColumn (GettextCatalog.GetString ("Version"), new CellRendererText (), "text", 1);
            // FIXME: this seems useless
            //treeView.AppendColumn (GettextCatalog.GetString ("Path"), new CellRendererText (), "text", 2);

            store.SetSortColumnId (0, SortType.Ascending);
            store.SetSortFunc (0, new TreeIterCompareFunc (SortTree));

            PrintCache();
            ScrolledWindow sc = new ScrolledWindow ();
            sc.ShadowType = Gtk.ShadowType.In;
            sc.Add (treeView);
            this.PackStart (sc, true, true, 0);
            ShowAll ();
            BorderWidth = 6;
        }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:34,代码来源:GacReferencePanel.cs

示例4: BuildOutput

        public BuildOutput()
        {
            Build();

            outputParser = new OutputParser();

            var column = new TreeViewColumn ();

            var iconCell = new CellRendererPixbuf ();
            var textCell = new CellRendererText ();
            var idCell = new CellRendererText ();

            idCell.Visible = false;

            column.PackStart (iconCell, false);
            column.PackStart (textCell, false);
            column.PackStart (idCell, false);

            treeview1.AppendColumn (column);

            column.AddAttribute (iconCell,  "pixbuf", 0);
            column.AddAttribute (textCell, "text", 1);
            column.AddAttribute (idCell, "text", 2);

            listStore = new TreeStore (typeof (Gdk.Pixbuf), typeof (string), typeof (string));

            treeview1.Model = listStore;

            textView1.SizeAllocated += TextView1_SizeAllocated;
        }
开发者ID:Cardanis,项目名称:MonoGame,代码行数:30,代码来源:BuildOutput.cs

示例5: SelectRenamedClassDialog

		public SelectRenamedClassDialog (IEnumerable<IType> classes)
		{
			XML glade = new XML (null, "gui.glade", "SelectRenamedClassDialog", null);
			glade.Autoconnect (this);
			
			store = new ListStore (typeof(Pixbuf), typeof(string));
			treeClasses.Model = store;
			
			TreeViewColumn column = new TreeViewColumn ();
		
			var pr = new CellRendererPixbuf ();
			column.PackStart (pr, false);
			column.AddAttribute (pr, "pixbuf", 0);
			
			CellRendererText crt = new CellRendererText ();
			column.PackStart (crt, true);
			column.AddAttribute (crt, "text", 1);
			
			treeClasses.AppendColumn (column);
			
			foreach (IType cls in classes) {
				Pixbuf pic = ImageService.GetPixbuf (cls.StockIcon);
				store.AppendValues (pic, cls.FullName);
			}
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:25,代码来源:SelectRenamedClassDialog.cs

示例6: OpenImagesListWidget

        public OpenImagesListWidget()
        {
            CanFocus = false;
            SetSizeRequest (200, 200);
            SetPolicy (PolicyType.Automatic, PolicyType.Automatic);

            tree = new TreeView ();
            tree.HeadersVisible = false;
            tree.EnableGridLines = TreeViewGridLines.None;
            tree.Selection.Mode = SelectionMode.Single;
            tree.Selection.SelectFunction = HandleDocumentSelected;

            file_name_column = new TreeViewColumn ();
            CellRendererText file_name_cell = new CellRendererText ();
            file_name_column.PackStart (file_name_cell, true);
            file_name_column.AddAttribute (file_name_cell, "text", 0);

            file_close_cell = new CellRendererPixbuf ();
            file_name_column.PackStart (file_close_cell, false);
            file_name_column.AddAttribute (file_close_cell, "pixbuf", 1);

            tree.AppendColumn (file_name_column);

            store = new ListStore (typeof (string), typeof (Gdk.Pixbuf));
            tree.Model = store;
            tree.ButtonPressEvent += HandleTreeButtonPressEvent;

            Add (tree);
            ShowAll ();

            PintaCore.Workspace.DocumentOpened += HandleDocumentOpenedOrClosed;
            PintaCore.Workspace.DocumentClosed += HandleDocumentOpenedOrClosed;
            PintaCore.Workspace.DocumentCreated += HandleDocumentOpenedOrClosed;
            PintaCore.Workspace.ActiveDocumentChanged += HandleActiveDocumentChanged;
        }
开发者ID:rolandixor,项目名称:Pinta,代码行数:35,代码来源:OpenImagesListWidget.cs

示例7: SelectRenamedClassDialog

		public SelectRenamedClassDialog (IEnumerable<INamedTypeSymbol> classes)
		{
			XML glade = new XML (null, "gui.glade", "SelectRenamedClassDialog", null);
			glade.Autoconnect (this);
			
			store = new ListStore (typeof(Xwt.Drawing.Image), typeof(string));
			treeClasses.Model = store;
			
			TreeViewColumn column = new TreeViewColumn ();
		
			var pr = new CellRendererImage ();
			column.PackStart (pr, false);
			column.AddAttribute (pr, "image", 0);
			
			CellRendererText crt = new CellRendererText ();
			column.PackStart (crt, true);
			column.AddAttribute (crt, "text", 1);

			treeClasses.AppendColumn (column);
			
			foreach (var cls in classes) {
				var pic = ImageService.GetIcon (cls.GetStockIcon ());
				store.AppendValues (pic, cls.GetFullName ());
			}
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:25,代码来源:SelectRenamedClassDialog.cs

示例8: MergeDialog

        public MergeDialog(MercurialRepository repo, bool rebasing)
        {
            this.Build ();

            this.repo = repo;
            this.rebasing = rebasing;

            store = new TreeStore (typeof(string), typeof(Gdk.Pixbuf), typeof (string), typeof(string));
            tree.Model = store;

            CellRendererPixbuf crp = new CellRendererPixbuf ();
            TreeViewColumn col = new TreeViewColumn ();
            col.PackStart (crp, false);
            col.AddAttribute (crp, "pixbuf", 1);
            CellRendererText crt = new CellRendererText ();
            col.PackStart (crt, true);
            col.AddAttribute (crt, "text", 2);
            tree.AppendColumn (col);

            tree.Selection.Changed += HandleTreeSelectionChanged;

            if (rebasing) {
                labelHeader.Text = GettextCatalog.GetString ("Select the branch to which to rebase:");
                checkStage.Label = GettextCatalog.GetString ("Stash/unstash local changes before/after rebasing");
            }

            checkStage.Active = true;

            Fill ();
        }
开发者ID:atsushieno,项目名称:monodevelop-mercurial,代码行数:30,代码来源:MergeDialog.cs

示例9: ProjectView

        public ProjectView ()
        {
            Build();
            basename = "base";

            var column = new TreeViewColumn ();

            var iconCell = new CellRendererPixbuf ();
            var textCell = new CellRendererText ();
            var idCell = new CellRendererText ();

            idCell.Visible = false;

            column.PackStart (iconCell, false);
            column.PackStart (textCell, false);
            column.PackStart (idCell, false);

            treeview1.AppendColumn (column);

            column.AddAttribute (iconCell,  "pixbuf", 0);
            column.AddAttribute (textCell, "text", 1);
            column.AddAttribute (idCell, "text", 2);

            listStore = new TreeStore (typeof (Gdk.Pixbuf), typeof (string), typeof (string));

            treeview1.Model = listStore;
            treeview1.Selection.Mode = SelectionMode.Multiple;

            treeview1.ButtonPressEvent += OnTreeview1ButtonPressEvent;
            treeview1.KeyReleaseEvent += HandleKeyReleaseEvent;
            treeview1.ButtonReleaseEvent += OnTreeview1ButtonReleaseEvent;
            treeview1.CursorChanged += OnTreeview1CursorChanged;
        }
开发者ID:KennethYap,项目名称:MonoGame,代码行数:33,代码来源:ProjectView.cs

示例10: ProjectViewBackendNodeView

		public ProjectViewBackendNodeView (ProjectViewFrontend frontend)
		{
			this.frontend = frontend;
			HeadersVisible = false;
			
			store = new TreeStore (typeof(Gdk.Pixbuf), typeof(string), typeof(ObjectWrapper), typeof(bool));
			Model = store;
			
			TreeViewColumn col;
			CellRenderer renderer;

			col = new TreeViewColumn ();

			renderer = new CellRendererPixbuf ();
			col.PackStart (renderer, false);
			col.AddAttribute (renderer, "pixbuf", 0);

			renderer = new CellRendererText ();
			col.PackStart (renderer, true);
			col.AddAttribute (renderer, "text", 1);

			AppendColumn (col);

			Selection.Mode = SelectionMode.Single;
			Selection.Changed += RowSelected;
			TestExpandRow += OnTestExpandRow;
			ShowAll ();
		}
开发者ID:nieve,项目名称:monodevelop,代码行数:28,代码来源:ProjectViewBackend.cs

示例11: Initialize

		public void Initialize (Gtk.TreeView treeView)
		{
			TreeViewColumn column = new TreeViewColumn ();

			CellRendererToggle toggleRenderer = new CellRendererToggle ();
			toggleRenderer.Toggled += ToggleRendererToggled;
			column.PackStart (toggleRenderer, false);
			column.AddAttribute (toggleRenderer, "active", 0);

			var pixbufRenderer = new CellRendererPixbuf ();
			column.PackStart (pixbufRenderer, false);
			column.AddAttribute (pixbufRenderer, "pixbuf", 1);

			CellRendererText textRenderer = new CellRendererText ();
			column.PackStart (textRenderer, true);
			column.AddAttribute (textRenderer, "text", 2);
			column.Expand = true;

			treeView.AppendColumn (column);
			Ambience ambience = AmbienceService.GetAmbienceForFile (options.Document.FileName);
			foreach (object obj in GetValidMembers ()) {
				var member = obj as IEntity;
				if (member != null) {
					Store.AppendValues (false, ImageService.GetPixbuf (member.GetStockIcon (), IconSize.Menu), ambience.GetString (member, OutputFlags.ClassBrowserEntries), member);
					continue;
				}
				
				var variable = obj as IVariable;
				if (variable != null)
					Store.AppendValues (false, ImageService.GetPixbuf (variable.GetStockIcon (), IconSize.Menu), variable.Name, variable);
				
			}
			
			treeView.Model = store;
		}
开发者ID:gary-b,项目名称:monodevelop,代码行数:35,代码来源:AbstractGenerateAction.cs

示例12: SharingConfigDialog

        public SharingConfigDialog ()
        {
            this.Build ();
            categoriesTreeView.Model = model;

            var complete_column = new TreeViewColumn ();

            var toggle_render = new CellRendererToggle ();
            toggle_render.Toggled += CellRendererToggle_Toggled;
            complete_column.PackStart (toggle_render, false);
            complete_column.SetCellDataFunc (toggle_render, new TreeCellDataFunc (ToggleDataFunc));

            var pix_render = new CellRendererPixbuf () { Mode = CellRendererMode.Inert };
            complete_column.PackStart (pix_render, false);
            complete_column.SetCellDataFunc (pix_render, new TreeCellDataFunc (IconDataFunc));

            var text_render = new CellRendererText () { Mode = CellRendererMode.Inert };
            complete_column.PackStart (text_render, true);
            complete_column.SetCellDataFunc (text_render, new TreeCellDataFunc (NameDataFunc));
    
            categoriesTreeView.AppendColumn (complete_column);

            empty_pixbuf.Fill(0xffffff00);

            Update ();

            LoadPreferences ();
        }
开发者ID:pacificIT,项目名称:mono-upnp,代码行数:28,代码来源:SharingConfigDialog.cs

示例13: MergeDialog

		public MergeDialog (GitRepository repo, bool rebasing)
		{
			this.Build ();

			this.UseNativeContextMenus ();

			this.repo = repo;
			this.rebasing = rebasing;

			store = new TreeStore (typeof(string), typeof(Xwt.Drawing.Image), typeof (string), typeof(string));
			tree.Model = store;

			var crp = new CellRendererImage ();
			var col = new TreeViewColumn ();
			col.PackStart (crp, false);
			col.AddAttribute (crp, "image", 1);
			var crt = new CellRendererText ();
			col.PackStart (crt, true);
			col.AddAttribute (crt, "text", 2);
			tree.AppendColumn (col);

			tree.Selection.Changed += HandleTreeSelectionChanged;

			if (rebasing) {
				labelHeader.Text = GettextCatalog.GetString ("Select the branch to which to rebase:");
				checkStage.Label = GettextCatalog.GetString ("Stash/unstash local changes before/after rebasing");
				buttonOk.Label = GettextCatalog.GetString ("Rebase");
			}

			checkStage.Active = true;

			Fill ();
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:33,代码来源:MergeDialog.cs

示例14: ProjectSelectorWidget

        public ProjectSelectorWidget()
        {
            this.Build();

            store = new TreeStore (typeof(string), typeof(string), typeof(object), typeof(bool), typeof(bool));
            tree.Model = store;

            tree.HeadersVisible = false;
            TreeViewColumn col = new TreeViewColumn ();
            Gtk.CellRendererToggle ctog = new CellRendererToggle ();
            ctog.Toggled += OnToggled;
            col.PackStart (ctog, false);
            var cr = new CellRendererImage ();
            col.PackStart (cr, false);
            Gtk.CellRendererText crt = new Gtk.CellRendererText();
            crt.Mode &= ~CellRendererMode.Activatable;
            col.PackStart (crt, true);
            col.AddAttribute (cr, "stock-id", 0);
            col.AddAttribute (crt, "markup", 1);
            col.AddAttribute (ctog, "active", 3);
            col.AddAttribute (ctog, "visible", 4);
            tree.AppendColumn (col);

            tree.Selection.Changed += HandleTreeSelectionChanged;
        }
开发者ID:Kalnor,项目名称:monodevelop,代码行数:25,代码来源:ProjectSelectorWidget.cs

示例15: MainWindow

		public MainWindow () : 
				base(Gtk.WindowType.Toplevel)
		{
			this.Build ();
			this.BorderWidth = 12;
			this.treeviewNodes.Model = store;
			var col =new TreeViewColumn ();
			col.Title ="Node";
			var pb = new CellRendererPixbuf ();
			col.PackStart (pb, false);
			col.AddAttribute (pb, "pixbuf", 3);
			
			var text = new CellRendererText ();
			col.PackStart (text, true);
			col.AddAttribute (text, "text", 0);
			
			this.treeviewNodes.AppendColumn (col);
			this.treeviewNodes.AppendColumn ("ResolveResult", new CellRendererText (), "text", 1);
			this.treeviewNodes.Selection.Changed += SelectionChanged;
//			this.treeviewNodes.HeadersVisible = false;
			this.textview1.ModifyFont (Pango.FontDescription.FromString ("Mono 14"));
			this.textview1.MoveCursor += HandleMoveCursor;
			string path = System.IO.Path.Combine (System.IO.Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location), "CSharpDemo.cs");
			this.textview1.Buffer.Text = File.ReadAllText (path);
			buttonParse.Clicked += HandleClicked;
			buttonGenerate.Clicked += CSharpGenerateCodeButtonClick;
			HandleClicked (this, EventArgs.Empty);
		}
开发者ID:artifexor,项目名称:NRefactory,代码行数:28,代码来源:MainWindow.cs


注:本文中的Gtk.TreeViewColumn.PackStart方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。