Re: GtkFrame y-alignment

From: Date: Fri, 06 Jul 2001 03:20:49 +0000
Subject: Re: GtkFrame y-alignment
Groups: php.gtk 
Request: Send a blank email to php-gtk+get-2065@lists.php.net to get a copy of this message
Probably not, Steph... If you remember, i was in troble - and Andrei and you do a lot of help to me - then, the first solution was alignment, and was solved with: $align = &new GtkAlignment(0.0,0.5,0.0,0.0); // result from a global search for 'align' $table->attach($align,0,1,0,1,GTK_FILL); // in all gtk manual... $align->show(); // and then a look in 'Hitchhiker's Guide' $label = &new GtkLabel('Code '); $label->set_justify(GTK_JUSTIFY_LEFT); // thanks twice, Steph ! Problem 1 solved ! In The Hitchhiker's Guide to PHP-GTK : &new GtkAlignment (double x_align, double y_align, double x_scale, double y_scale); ---------------------------------------------------------------------------- positions and sizes a single child widget within a container. The range of x_align and y_align are 0.0 to 1.0, with 0.0 being top/left, and 1.0 being bottom/right. The range of values for x_scale and y_scale are also 0.0 to 1.0, with 0.0 not showing the child at all and 1.0 (for both) expanding the child to fill all the available space. But, in GTK REference (http://developer.gnome.org/doc/API/gtk/gtkalignment.html): gtk_alignment_new () GtkWidget* gtk_alignment_new (gfloat xalign, gfloat yalign, gfloat xscale, gfloat yscale); Creates a new GtkAlignment. xalign : the horizontal alignment of the child widget, from 0 (left) to 1 (right). yalign : the vertical alignment of the child widget, from 0 (top) to 1 (bottom). xscale : the amount that the child widget expands horizontally to fill up unused space, from 0 to 1. A value of 0 indicates that the child widget should never expand. A value of 1 indicates that the child widget will expand to fill all of the space allocated for the GtkAlignment. yscale : the amount that the child widget expands vertically to fill up unused space, from 0 to 1. The values are similar to xscale. Returns : the new GtkAlignment. Really, i realized that wrote in GTK Reference is the correct, and the xscale & yscale was ok in phpgtk. Mauro Ferreira mauroferreira@enersulnet.com.br

« previous php.gtk (#2065) next »