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


C# TreeView.AppendColumn方法代码示例

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


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

示例1: SetupTree

            private void SetupTree()
            {
                tree = new TreeView ();
                this.store = new ListStore (typeof (object));
                tree.Model = store;

                TreeViewColumn col = new TreeViewColumn ();
                col.Sizing = TreeViewColumnSizing.Fixed;
                col.Spacing = 4;

                CellRendererText text_renderer =
                    new CellRendererText ();
                text_renderer.WrapMode = Pango.WrapMode.Word;
                col.PackStart (text_renderer, true);
                col.SetCellDataFunc (text_renderer,
                             new
                             TreeCellDataFunc
                             (PluginInfoCellDataFunc));

                CellRendererToggle loaded_renderer =
                    new CellRendererToggle ();
                loaded_renderer.Activatable = false;
                col.PackStart (loaded_renderer, false);
                col.SetCellDataFunc (loaded_renderer,
                             new
                             TreeCellDataFunc
                             (LoadedStatusCellDataFunc));

                col.Title = Catalog.GetString("Plugins Details");
                tree.AppendColumn (col);
            }
开发者ID:BackupTheBerlios,项目名称:csboard-svn,代码行数:31,代码来源:PluginManagerDialog.cs

示例2: OpeningBrowserUI

            public OpeningBrowserUI(OpeningsDb db)
                : base()
            {
                menubar = new AppMenuBar ();
                title = Catalog.GetString ("Opening Browser");
                accel = new AccelGroup ();
                menubar.quitMenuItem.
                    AddAccelerator ("activate", accel,
                            new AccelKey (Gdk.Key.
                                      q,
                                      Gdk.
                                      ModifierType.
                                      ControlMask,
                                      AccelFlags.
                                      Visible));
                toolbutton = new ToolButton (Stock.Info);
                toolbutton.Label =
                    Catalog.GetString ("Openings");
                toolbutton.ShowAll ();

                this.db = db;
                store = new TreeStore (typeof (string),
                               typeof (int),
                               typeof (string));
                this.db.PopulateTree (store);
                view = new TreeView ();
                view.Model = store;
                view.AppendColumn (Catalog.
                           GetString ("Moves"),
                           new CellRendererText (),
                           "text", 0);
                view.AppendColumn (Catalog.
                           GetString ("Variations"),
                           new CellRendererText (),
                           "text", 1);
                view.AppendColumn (Catalog.
                           GetString ("Name"),
                           new CellRendererText (),
                           "markup", 2);

                ScrolledWindow win = new ScrolledWindow ();
                win.SetPolicy (PolicyType.Automatic,
                           PolicyType.Automatic);
                win.Add (view);

                boardWidget = new GameViewerBoard ();
                HPaned split = new HPaned ();
                VBox box = new VBox ();
                box.PackStart (boardWidget, true, true, 2);
                split.Pack1 (box, false, true);	// resize, shrink
                split.Pack2 (win, true, true);
                split.ShowAll ();
                //split.Position = 400;
                int width, height;
                CsBoardApp.Instance.Window.GetSize (out width,
                                    out
                                    height);
                split.Position =
                    (int) Math.Round (width * 0.5f);
                split.PositionSet = true;
                PackStart (split, true, true, 2);

                view.CursorChanged += OnCursorChanged;
                ShowAll ();
            }
开发者ID:BackupTheBerlios,项目名称:csboard-svn,代码行数:65,代码来源:OpeningBrowserUI.cs

示例3: create_tree

            private void create_tree()
            {
                tree = new TreeView ();
                tree.Model = store;
                tree.HeadersVisible = false;
                //tree.HeadersClickable = true;

                CellRendererText renderer =
                    new CellRendererText ();
                renderer.Yalign = 0;

                TreeViewColumn col = new TreeViewColumn ();
                //col.Title = Catalog.GetString ("Tournament");
                col.PackStart (renderer, false);
                col.SetAttributes (renderer, "markup", 1);
                CellRendererText resultRenderer =
                    new CellRendererText ();
                resultRenderer.Xpad = 5;
                resultRenderer.Yalign = 0;
                col.PackStart (resultRenderer, false);
                col.SetAttributes (resultRenderer, "markup",
                           2);

                tree.AppendColumn (col);
                tree.RowActivated += OnRowActivated;
            }
开发者ID:BackupTheBerlios,项目名称:csboard-svn,代码行数:26,代码来源:RelayTournamentsView.cs

示例4: ICSGameObserverWidget

            public ICSGameObserverWidget(ICSClient
						      client)
                : base()
            {
                split = new HPaned ();
                this.client = client;
                currentGames = new Hashtable ();
                gamesBook = new Notebook ();
                gamesBook.ShowTabs = false;

                gamesList = new TreeView ();
                gamesStore =
                    new ListStore (typeof (string),
                               typeof (string));
                gamesList.Model = gamesStore;
                gamesList.AppendColumn ("Games",
                            new
                            CellRendererText (),
                            "markup", 0);
                ScrolledWindow scroll = new ScrolledWindow ();
                scroll.HscrollbarPolicy =
                    scroll.VscrollbarPolicy =
                    PolicyType.Automatic;
                scroll.Add (gamesList);

                gamesList.CursorChanged +=
                    OnGamesListCursorChanged;
                split.Add1 (scroll);
                split.Add2 (gamesBook);

                split.ShowAll ();
                PackStart (split, true, true, 2);
                client.GameMessageEvent += OnGameMessage;
            }
开发者ID:BackupTheBerlios,项目名称:csboard-svn,代码行数:34,代码来源:ICSGameObserverWidget.cs


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