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


C# TreeViewColumn.AddNotification方法代码示例

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


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

示例1: GetEntriesTreeViewColumn

        //columnId used to identify which column was clicked later, hacky solution
        TreeViewColumn GetEntriesTreeViewColumn(string title, string columnID, int sortColumnId, 
		                                         TreeCellDataFunc treeCellDataFunc,
		                                         EditedHandler editHandler = null)
        {
            TreeViewColumn column = new TreeViewColumn ();
            column.Expand = true;
            column.SortIndicator = true;
            column.SortColumnId = sortColumnId;
            column.Sizing = TreeViewColumnSizing.Fixed;
            column.Resizable = true;
            column.Title = GettextCatalog.GetString (title);
            column.Data.Add ("columnID", columnID);

            CellRendererText textCell = new CellRendererText ();
            //cell.Ellipsize = Pango.EllipsizeMode.End;
            textCell.WrapMode = Pango.WrapMode.Word;
            textCell.Editable = true;

            if (editHandler == null)
                textCell.EditingStarted += DeferEditing;
            else
                textCell.Edited += editHandler;

            var p = Gtk.IconTheme.Default.LoadIcon ("gtk-zoom-in", 16, (IconLookupFlags) 0);

            CellRendererButton zoomCell = new CellRendererButton (p);
            zoomCell.Clicked += OnZoomCellClick;
            zoomCell.Data.Add ("columnID", columnID);

            column.AddNotification ("width", OnColumnWidthChanged);
            column.PackStart (zoomCell, false);
            column.PackStart (textCell, true);
            column.SetCellDataFunc (textCell, treeCellDataFunc);

            return column;
        }
开发者ID:mono-soc-2012,项目名称:ressource-md-addin,代码行数:37,代码来源:ResXEditorWidget.cs


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