Пример #1
0
        public static void EnableAutoTooltips(this Gtk.TreeView tree)
        {
            TreeViewTooltipsData data = new TreeViewTooltipsData();

            treeData [tree]         = data;
            tree.MotionNotifyEvent += HandleMotionNotifyEvent;
            tree.LeaveNotifyEvent  += HandleLeaveNotifyEvent;
            tree.ButtonPressEvent  += HandleButtonPressEvent;
            tree.ScrollEvent       += HandleTreeScrollEvent;
            tree.Hidden            += HandleTreeHidden;
            tree.Unrealized        += HandleTreeHidden;
            tree.Destroyed         += HandleTreeDestroyed;
        }
Пример #2
0
		public static void EnableAutoTooltips (this Gtk.TreeView tree)
		{
			TreeViewTooltipsData data = new TreeViewTooltipsData ();
			treeData [tree] = data;
			tree.MotionNotifyEvent += HandleMotionNotifyEvent;
			tree.LeaveNotifyEvent += HandleLeaveNotifyEvent;
			tree.ButtonPressEvent += HandleButtonPressEvent;
			tree.ScrollEvent += HandleTreeScrollEvent;
			tree.Hidden += HandleTreeHidden;
			tree.Unrealized += HandleTreeHidden;
			tree.Destroyed += delegate {
				ResetTooltip (tree);
				treeData.Remove (tree);
			};
		}