[9123] in The GTK GIMP ToolKit mailing list archive
[gtk-list] Re: padding on buttons w/text
daemon@ATHENA.MIT.EDU (Johannes Keukelaar)
Fri Oct 9 10:04:06 1998
To: gtk-list@redhat.com
From: johannes@nada.kth.se (Johannes Keukelaar)
In-reply-to: Your message of "Fri, 09 Oct 1998 09:51:13 -0000."
<199810090951.JAA30810@dweezil.dyn.ml.org>
Date: Fri, 09 Oct 1998 16:03:32 +0200
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com
//"Damon Chaplin" <DAChaplin@email.msn.com> wrote:
//>
//> button = gtk_button_new_with_label ("Hello World");
//> gtk_misc_set_padding (GTK_MISC (GTK_BUTTON (button)->child)), 20,
//> 10)
//
//Damon,
//
//Best solution I've seen; way better than the pile of widgets I was
//having at. I was not aware that you could generically refer to a child
//widget like that.
That depends on what you mean with 'refer to a child widget like that'. Button
widgets allow you to access their child widget like that (GTK_BUTTON (button)->
child). If you create the button with gtk_button_new_with_label, then, not very
surprisingly, the child you access that way is a GTK_LABEL widget. Label
widgets are descendents (classwise) of GTK_MISC widgets. Misc widgets (and
therefor labels) allow you to set the padding like that.
Regards,
Johannes.
--
`#define QUESTION ((bb) || !(bb))' - Shakespeare.
Bibliovorous chocophiliac.
--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null