[gtk-list] Re: Packing stuff in buttons



On Thu, May 08, 1997 at 09:45:12AM -0700, Raph Levien wrote:
> 
> 
> On Thu, 8 May 1997, Otto Hammersmith wrote:
> > If you look at the source for gtk_button_new_with_label(), you'll see
> > that all it's doing is creating a new button, then using
> > gtk_container_add() to insert a label into the button.  So, create the
> > button and pixmap, and use gtk_container_add() to put the pixmap in
> > the button.  
> > 
> > You can even have both a label and a pixmap.. you should be able to
> > have more than one label, and more than one pixmap, though I've never
> > actually done it. :)
> 
> If you wanted to do this, you wouldn't just call gtk_container_add () 
> twice -- once for the label and once for the pixmap. Instead, you'd 
> create a box, pack the label and the pixmap into the box, and add the box 
> into the button.
> 
> The button add method is a no-op if the button already contains 
> something. However, you can nest things indefinitely in gtk+ by using 
> containers, so it's no problem.

Of course, you're right.

That'll teach me to answer a question without checking my notes and
test source code.  *sigh*

-- 
					-Otto.

--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]