[MonoDevelop] Signals in the property viewer
alan battersby
alan.battersby at ntlworld.com
Wed Sep 16 11:58:12 EDT 2009
Hi,
I have created a widget that inherits from treeview see code below. It
compiles and appears in the toolbox and I can add it into a design. When
I select my widget in designer I had expected to see the the signals
associated with the base treeview class, but all that is displayed are
the common widget signals. Is there something I should be adding to the
code to make the treeview signals visible in the inspector?
thanks
Alan
[System.ComponentModel.ToolboxItem(true)]
public class TreeviewPopup : TreeView
{
Gtk.Menu menu;
public TreeviewPopup() : base()
{
menu = new Gtk.Menu();
}
protected override bool OnButtonPressEvent (Gdk.EventButton evnt)
{
if(evnt.Button == 3) {
if (menu != null)
menu.Popup();
return true;
}
// Now if we would ever get this far
// we run the TreeViews OnButtonPressEvent function
// to make sure everything else works as normal
return base.OnButtonPressEvent(evnt);
}
public void AppendMenuItem(MenuItem itm)
{
menu.Append(itm);
menu.ShowAll();
}
}
More information about the Monodevelop-list
mailing list