[Gtk-sharp-list] EventHandler

Dominik Zabłotny dominz at wp.pl
Thu Jul 14 19:56:15 EDT 2005


If I understood correctly, here is the problem:

>                 if (config.xboxs[i].name.Equals(o.ToString())) {

Widget.ToSting() returns name of class, like "Gtk.MenuItem"
It should be something like this instead:

string s;
if (o is ImageMenuItem)
  (((o as ImageMenuItem).Child as HBox).Children[1] as Label).Text;
else
  ((o as MenuItem).Child as Label).Text;

You may also consider creating hashtable of strings indexed by controls

-- 
Dominik Zablotny
xmpp://doza@chrome.pl



More information about the Gtk-sharp-list mailing list