[Gtk-sharp-list] [Semi-OT] Retrieving the lone child of a container
Leo Spalteholz
leo@thewoodpecker.ca
Sat, 1 Nov 2003 16:19:37 -0800
Sorry I don't know if this is gtk-sharp specific but its been bugging me
for a while...
For a Gtk.Button (or any container designed for only one child for that
matter), is there an easy way to retrieve the child widget?
The only thing I've been able to come up with is:
Widget blah = null;
foreach(Widget child in mybutton.Children)
blah = child;
But it seems.. umm.. less than ideal to put it nicely. There must be a
better way. :)
Thanks,
Leo