PHP-GTK
Thursday, August 21, 2014 
download | documentation | applications | faq | changelog | resources 


search for in the  


previousTabular layout with GtkTable
Object Oriented Programmingnext

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

This container has no own layouting logic; you have to tell where the widget shall be placed. The size of the widgets is determined automatically, but you can override that by requesting a certain size via set_size_request() .

While it's very simple to place and layout the widgets, they are fixed: Resizing the window doesn't move or resize the widgets. Use it only when it's absolute necessary; dynamic containers are often the better choice.

Example 7.3. Fixed layout with GtkFixed

<?php
$w = new GtkWindow();
$w->set_title('GtkFixed test');
$w->connect_simple('destroy', array('gtk', 'main_quit'));
 
$btn = new GtkButton('Button');
$txt = new GtkEntry();
 
$fixed = new GtkFixed();
$w->add($fixed);
 
$fixed->put($btn, 10, 100);
$fixed->put($txt, 50, 10);
$btn->set_size_request(150, -1);
 
$w->show_all();
Gtk::main();
?>

User Contributed Notes
tutorials.packing.fixed.php
add a note about notes
There are no user contributed notes for this page.


previousTabular layout with GtkTable
Object Oriented Programmingnext

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:51:01 2013 CEST