Re: [gtk-list] Re: padding on buttons w/text
- From: Tim Janik <timj gtk org>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: padding on buttons w/text
- Date: Sun, 11 Oct 1998 05:52:44 +0200 (CEST)
On Fri, 9 Oct 1998, Johannes Keukelaar wrote:
> //"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.
in the development version (i.e. 1.1.x), the GtkButton.child member is actually
deprecated and may get removed with some future Gtk+ version.
the correct way to retrive the child pointer there is GTK_BIN (button)->child.
>
> Regards,
>
> Johannes.
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]