Re: [gtk-list] Re: padding on buttons w/text
- From: johannes nada kth se (Johannes Keukelaar)
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: padding on buttons w/text
- Date: Fri, 09 Oct 1998 16:03:32 +0200
//"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.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]