Re: When packing widgets, what is the difference between "box" and "table "



On Tue, Jul 04, 2006 at 12:26:49PM +0800, chao yeaj wrote:
Hello, everyone
       First ,i am sorry for my terrible  English.

       When packing widgets ,we can use the box widget or the table
widget,but what is the difference ?

Box widgets come basically in two flavours: VBox and HBox. They are
quite simple --

a HBox:        +-----+---+----------+---+
               |     |   |          |   |
               |     |   |          |   |
               |     |   |          |   |
               |     |   |          |   |
               +-----+---+----------+---+

A VBox:        +-------------------+
               |                   |
               +-------------------+
               |                   |
               +-------------------+
               |                   |
               |                   |
               +-------------------+
               |                   |
               |                   |
               |                   |
               +-------------------+

The table is more complicated. You can do things like this:

               +----+----+------+----+
               |    |    |      |    |
               +----+----+------+----+
               |    |    |      |    |
               +----+----+------+----+
               |    |    |      |    |
               |    |    |      |    |
               +----+----+------+----+
               |    |    |      |    |
               +----+----+------+----+

But you can do this as well:

               +----+----+------+----+
               |    |    |      |    |
               +----+----+------+----+
               |    |           |    |
               +----+           +----+
               |    |           |    |
               |    |           |    |
               +----+----+------+----+
               |    |    |      |    |
               +----+----+------+----+
               |    |                |
               +----+----+------+----+
               |    |    |      |    |
               +----+----+------+----+

I hope these little pictures help.

       when many widgets packed to the box or table,how to  modify the
"tab order" of those packed widgets ?

This seems to be the "focus chain"of a container widget. See e.g.

  <http://developer.gnome.org/doc/API/2.0/gtk/GtkContainer.html#gtk-container-get-focus-chain>

HTH
-- tomás


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