本文整理汇总了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;
}