ruby-****@sourc*****
ruby-****@sourc*****
2012年 9月 17日 (月) 08:45:39 JST
------------------------- REMOTE_ADDR = 184.145.80.187 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-treev-parts ------------------------- @@ -77,7 +77,28 @@ * Gtk::CellRendererText - Renders text in a cell * Gtk::CellRendererToggle - Renders a toggle button in a cell -Cell renderers are packed into tree view columns similar to how you add widgets into horizontal boxes. Each tree view column can contain one or more cell renderers, which are used to render the data. For example, in a file browser, the image column would be rendered with the Gtk::CellRendererPixbuf and the file name with Gtk::CellRendererText. The primary use of a Gtk::CellRenderer is for drawing a certain graphical elements on a Gdk::Drawable. Typically, one cell renderer is used to draw many cells on the screen. Each cell renderer is responsible for rendering a column of cells, one for every row in the tree view. It begins with the first row, rendering its cells and then proceeding to the next row down until all that was requested or the entire column is completed. Or to put it differently, a cell renderer does not render just one single cell, but is responsible for rendering part or whole of a tree view column for each single row. It basically starts in the first row and renders its part of the column there. Then it proceeds to the next row and renders its part of the column there again. And so on. + + +Cell renderers are packed into tree view columns similar to how you add widgets into horizontal boxes with Gtk::TreeViewColumn#pack_start and Gtk::TreeViewColumn#pack_end respectively. Each tree view column can contain one or more cell renderers, which are used to render the data. For example, in a file browser, the image column would be rendered with the Gtk::CellRendererPixbuf and the file name with Gtk::CellRendererText. + + +--- pack_start(cell, expand) + + Packs the cell into the beginning of the column. If expand is false, then the cell is allocated no more space than it needs. Any unused space is divided evenly between cells for which expand is true. + * cell: The Gtk::CellRenderer. + * expand: true if cell is to be given extra space allocated to box. + * Returns: self + +--- pack_end(cell, expand) + + Adds the cell to end of the column. If expand is false, then the cell is allocated no more space than it needs. Any unused space is divided evenly between cells for which expand is true. + * cell: The Gtk::CellRenderer. + * expand: true if cell is to be given extra space allocated to box. + * Returns: self + + + +The primary use of a Gtk::CellRenderer is for drawing a certain graphical elements on a Gdk::Drawable. Typically, one cell renderer is used to draw many cells on the screen. Each cell renderer is responsible for rendering a column of cells, one for every row in the tree view. It begins with the first row, rendering its cells and then proceeding to the next row down until all that was requested or the entire column is completed. Or to put it differently, a cell renderer does not render just one single cell, but is responsible for rendering part or whole of a tree view column for each single row. It basically starts in the first row and renders its part of the column there. Then it proceeds to the next row and renders its part of the column there again. And so on. ####################################### # -- ig: append the next extension here