Gtk2::Ex::TableBits -- helpers for Gtk2::Table widgets


 use Gtk2::Ex::TableBits;


Gtk2::Ex::TableBits::update_attach ($table, $child, $left_attach, $right_attach, $top_attach, $bottom_attach, $xoptions, $yoptions, $xpadding, $ypadding)

Update the attachment positions of $child in $table, if necessary. The arguments are the same as $table->attach().

If $child is not attached to $table, or if it's not at the given positions, then a remove() and fresh attach() are done to put it there.

This function is designed to move a child to what might be a new position, but do nothing if it's already in the right place. Avoiding an unnecessary remove() and attach() can save a lot of resizing and possibly some flashing.

Another way to move a child is by changing the container child properties


but only when child is already attached in the correct table (whereas update_attach() can make an initial attachment or move to a different $table).


Gtk2::Table, Gtk2::Ex::WidgetBits



Copyright 2008, 2009, 2010, 2011, 2012 Kevin Ryde

Gtk2-Ex-WidgetBits is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

Gtk2-Ex-WidgetBits is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Gtk2-Ex-WidgetBits. If not, see