PHP-GTK
Monday, November 24, 2014 
download | documentation | applications | faq | changelog | resources 


search for in the  


previousGtkAdjustment::value
GtkAlignment Constructornext

Last updated: Sun, 12 May 2013
view this page in English

GtkAlignment

A container that controls the alignment and size of it's child.

Object Hierarchy

Description

The GtkAlignment container controls the alignment and size of it's child, relative to it's own dimensions. However, if the child has a size request from it's own child/children, it will take precedence. For example, a GtkButton with a label will never be scaled down to a size smaller than that of the label.

It can be used to define the relative alignment of the child within the container, through the xalign and yalign parameters. Both can vary between 0 and 1, meaning left/top and right/bottom, respectively. This is very useful, for instance in left- or right-aligning GtkLabels.

Another use for GtkAlignment (through xscale and yscale), is to indicate the ammount of extra free space in the container the child should be extended to occupy. Note that this isn't the same as total size of the child widget.

GtkAlignment also provides methods to specifically set (and retrieve the current) top, bottom, right and left padding of the widget.

Constructors

GtkAlignment ([double xalign = 0.5 [, double yalign = 0.5 [, double xscale = 1.0 [, double yscale = 1.0]]]]);

-- Creates a container that controls the alignment and size of it's child.

Methods

get_padding()
  Gets the padding on the different sides of the widget.
set()
  Sets new values for GtkAlignment.
set_padding()
  Sets the padding on the different sides of the widget.


User Contributed Notes
gtk.gtkalignment.php
add a note about notes
There are no user contributed notes for this page.


previousGtkAdjustment::value
GtkAlignment Constructornext

Last updated: Sun, 12 May 2013
view this page in English


credits 

PHP  Copyright © 2001-2014 The PHP Group
 All rights reserved.
Last updated: Sun May 12 20:50:56 2013 CEST