[ruby-gnome2-doc-cvs] [Hiki] update - Gtk::Table

Back to archive index

ruby-****@lists***** ruby-****@lists*****
2003年 4月 28日 (月) 16:43:23 JST


-------------------------
REMOTE_ADDR = 61.204.181.66
REMOTE_HOST = 
-------------------------

-------------------------
= class Gtk::Table
The Gtk::Table functions allow the programmer to arrange widgets in rows and columns, making it easy to align many widgets next to each other, horizontally and vertically.

Tables are created with a call to Gtk::Table#new, the size of which can later be changed with Gtk::Table#resize.

Widgets can be added to a table using Gtk::Table#attach or the more convenient (but slightly less flexible) Gtk::Table#attach_defaults.

To alter the space next to a specific row, use Gtk::Table#set_row_spacing, and for a column, Gtk::Table#set_column_spacing.

The gaps between all rows or columns can be changed by calling Gtk::Table#row_spacings= or Gtk::Table#column_spacings= respectively.

Gtk::Table#homogeneous=, can be used to set whether all cells in the table will resize themselves to the size of the largest widget in the table.


== super class
* ((<Gtk::Container>))

== class methods
--- Gtk::Table.new(rows, columns, homogeneous = false)
    Used to create a new table widget. An initial size must be given by specifying how many rows and columns the table should have, although this can be changed later with Gtk::Table#resize. rows and columns must both be in the range 0 .. 65535.
    * rows: The number of rows the new table should have. 
    * columns: The number of columns the new table should have. 
    * homogeneous: If set to true, all table cells are resized to the size of the cell containing the largest widget. 
    * Returns: A pointer to the the newly created table widget.  

== public instance methods
--- resize(rows, columns)
    If you need to change a table's size after it has been created, this function allows you to do so.
    * rows: The new number of rows. 
    * columns: The new number of columns.  
    * Returns: self

--- attach(child, left, right, top, bottom, xopt = Gtk::EXPAND|Gtk::FILL, yopt = Gtk::EXPAND|Gtk::FILL, xpad = 0, ypad = 0)
    Adds a widget to a table. The number of 'cells' that a widget will occupy is specified by left, right, top and bottom. These each represent the leftmost, rightmost, uppermost and lowest column and row numbers of the table. (Columns and rows are indexed from zero).
    * child: The widget to add. 
    * left: the column number to attach the left side of a child widget to. 
    * right: the column number to attach the right side of a child widget to. 
    * top: the row number to attach the left side of a child widget to. 
    * bottom: the column number to attach the right side of a child widget to. 
    * xopt: Used to specify the properties of the child widget when the table is resized. (((<GtkAttachOptions|Gtk#GtkAttachOptions>)))
    * yopt: The same as xopt, except this field determines behaviour of vertical resizing. (((<GtkAttachOptions|Gtk#GtkAttachOptions>)))
    * xpad: An integer value specifying the padding on the left and right of the widget being added to the table. 
    * ypad: The amount of padding above and below the child widget.  
    * Returns: self

--- attach_defaults(widget, left, right, top, bottom)
    As there are many options associated with Gtk::Table#attach, this convenience method provides the programmer with a means to add children to a table with identical padding and expansion options.
    * widget : The child widget to add. 
    * left: the column number to attach the left side of a child widget to. 
    * right: the column number to attach the right side of a child widget to. 
    * top: the row number to attach the left side of a child widget to. 
    * bottom: the column number to attach the right side of a child widget to. 
    * Returns: self

--- get_row_spacing(row)
    Gets the amount of space between row row, and row row + 1. See Gtk::Table#set_row_spacing.
    * row: a row in the table, 0 indicates the first row 
    * Returns: the row spacing 
--- set_row_spacing(row, spacing)
    Changes the space between a given table row and its surrounding rows.
    * row: row number whose spacing will be changed. 
    * spacing: number of pixels that the spacing should take up.  
    * Returns: self

--- row_spacings
    Gets the amount of space between two consecutive rows.
    * Returns: the amount of space between two consecutive rows.
--- row_spacings=(spacing)
    Sets the amount of space between two consecutive rows.
    * spacing: the amount of space between two consecutive rows.
    * Returns: spacing
--- set_row_spacings(spacing)
    Same as row_spacing=.
    * spacing: the amount of space between two consecutive rows.
    * Returns: self

--- default_row_spacing
    Gets the default row spacing for the table. This is the spacing that will be used for newly added rows. (See Gtk::Table#row_spacings=)
    * Returns: value the default row spacing

--- get_column_spacing(column)
    Gets the amount of space between column col, and column col + 1. See Gtk::Table#set_column_spacing.
    * column: a column in the table, 0 indicates the first column 
    * Returns: the column spacing 
--- set_column_spacing(column, spacing)
    Alters the amount of space between a given table column and the adjacent columns.
    * column: the column whose spacing should be changed. 
    * spacing: number of pixels that the spacing should take up.  

--- column_spacings
    Gets the amount of space between two consecutive rows.
    * Returns: the amount of space between two consecutive rows.
--- column_spacings=(spacing)
    Sets the amount of space between two consecutive columns.
    * spacing: the amount of space between two consecutive columns.
    * Returns: spacing
--- set_column_spacings(spacing)
    Same as column_spacings=.
    * spacing: the amount of space between two consecutive columns.
    * Returns: self

--- default_column_spacing
    Gets the default column spacing for the table. This is the spacing that will be used for newly added columns. (See Gtk::Table#column_spacings=)
    * Returns: value the default column spacing

--- homogeneous?
    Returns whether the table cells are all constrained to the same width and height. (See Gtk::Table#homogenous=)
    * Returns: true if the cells are all constrained to the same size 
--- homogeneous=(homogeneous)
    Changes the homogenous property of table cells, ie. whether all cells are an equal size or not.
    * homogeneous: Set to true to ensure all table cells are the same size. Set to false if this is not your desired behaviour.  
    * Returns: homogeneous
--- set_homogeneous(homogeneous)
    Same as homogeneous=.
    * homogeneous: Set to true to ensure all table cells are the same size. Set to false if this is not your desired behaviour.  
    * Returns: self

--- n_rows
    Retrieves the number of rows in a table.
    * Returns: the number of rows in a table.
--- n_rows=(rows)
    Sets the number of rows in a table.
    * rows: the number of rows in a table.
    * Returns: rows
--- set_n_rows(rows)
    Same as n_rows=.
    * rows: the number of rows in a table.
    * Returns: self

--- n_columns
    Retrieves the number of columns in a table.
    * Returns: the number of columns in a table.
--- n_columns=(columns)
    Sets the number of columns in a table.
    * columns: the number of columns in a table.
    * Returns: columns
--- set_n_columns(columns)
    Same as n_columns=.
    * columns: the number of columns in a table.
    * Returns: self


((<Masao>))




ruby-gnome2-cvs メーリングリストの案内
Back to archive index