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

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2004年 4月 22日 (木) 02:10:53 JST


-------------------------
REMOTE_ADDR = 217.117.55.140
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp//?Gtk%3A%3ATable
-------------------------
  = 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.
  
  
  == Object Hierarchy
  * Object
    * GLib::Instantiatable
      * GLib::Object
        * Gtk::Object
          * Gtk::Widget
            * Gtk::Container
              * Gtk::Table
  
  == 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.  
  
  == 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. 
+     * bottom: the row 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. 
+     * bottom: the row 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
  
  == Properties
  --- column-spacing: Integer (Read/Write)
      The amount of space between two consecutive columns
  
  --- homogeneous: true or false (Read/Write)
      If true this means the table cells are all the same width/height
  
  --- n-columns: Integer (Read/Write)
      The number of columns in the table
  
  --- n-rows: Integer (Read/Write)
      The number of rows in the table
  
  --- row-spacing: Integer (Read/Write)
      The amount of space between two consecutive rows
  
  ((<Masao>))





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