Re: [Java-gnome-developer] How to change the icon of a ToolMenuButton ?
Brought to you by:
afcowie
From: Andrew C. <an...@op...> - 2006-06-09 10:57:56
|
On Thu, 2006-06-08 at 15:31 +0000, Remy Suen wrote: > I think this is what Glade is doing in terms of adding a > MenuToolButton into a ToolBar. I've found in the past that GTK and Glade in particular does some unexpected things in order to achieve the results we take for granted. ToggleToolButtons, for example, are incredibly convoluted - partly so of what Glade creates, and partly because of how GTK maps them. If someone needs more details about them I can point you to the xseq code that manipulates them for buttons. A more mundane example is a "simple" stock button like OK. In actuality, GTK takes the stock button request and forms an Image plunks the OK pixbuf into it, then forms a Label, plunks "Ok" into it, and then makes an HBox, packs the Image and Label into the HBox, and then stuffs the HBox into the Button. Sometimes, after much hair-pulling, I've found myself rendering something, and then calling the Widget's getChildren() method, then walking the Widgets returned, and so on down until I learned what the heck was in there. Usually you can get some insight by reading the .glade file. Just pull it up in a nice syntax highlighting editor, and look at the families of widgets it has created. [Keep in mind that GTK could further complicate things at runtime] AfC Sydney |