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(); ?> |