Re: Alignment values



On Mon, 2007-09-24 at 14:47 +1000, Andrew Cowie wrote:
> Has anyone ever needed to use a value other than 0.0, 0.5, or 1.0 to the
> various alignment properties? ie for
> 
>         gtk_alignment_set_padding(xalign, yalign)
>         gtk_button_set_alignment(xalign, yalign)
>         GtkCellRenderer's xalign, yalign
> 
> etc. It seems to me that left,center,right and top,center,bottom are all
> I've ever used, and was curious if there was another [useful,powerful]
> usage that I might have missed.

In gtkmm, we created enums (and a method overload that used them) to
make this easier in the common case:
http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1Alignment.html#a7beb482dde0e58c49a8c6154558eb94
This can be used in a few other places, such as the GtkAspectFrame and
maybe the GtkTable.

But we still allow the use of the numbers.

-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]