[gtk-list] Packing stuff in buttons
- From: Raph Levien <raph acm org>
- To: gtk-list redhat com
- Subject: [gtk-list] Packing stuff in buttons
- Date: Thu, 8 May 1997 09:45:12 -0700 (PDT)
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.
Raph
--
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]