gtk.CellView
Prev | The gtk Class Reference | Next

## gtk.CellView

gtk.CellView — a widget displaying a single row of a `gtk.TreeModel` (new in PyGTK 2.6).

## Synopsis

    class gtk.CellView(gtk.Widget, gtk.CellLayout):
        gtk.CellView()
        def set_model(model)
        def set_displayed_row(path)
        def get_displayed_row()
        def get_size_of_row(path, requisition)
        def set_background_color(color)
        def get_cell_renderers()

    Functions

        def gtk.cell_view_new_with_text(text)
        def gtk.cell_view_new_with_markup(markup)
        def gtk.cell_view_new_with_pixbuf(pixbuf)

## Ancestry

    +-- gobject.GObject
      +-- gtk.Object
        +-- gtk.Widget
          +-- gtk.CellView (implements gtk.CellLayout)

## gtk.CellView Properties

gtk.Object Properties

gtk.Widget Properties

"background" | Write | The background color as a string. Default value: `None`
"background-gdk" | Read-Write | The background color as a `gtk.gdk.Color`.
"background-set" | Read-Write | If `True`, use the "background-gdk" property to set the background color.
"model" | Read-Write | The model for cell view. Available in GTK+ 2.10 and above.

## gtk.CellView Style Properties

gtk.Widget Style Properties

## gtk.CellView Signal Prototypes

gobject.GObject Signal Prototypes

gtk.Object Signal Prototypes

gtk.Widget Signal Prototypes

## Description

### Note

This widget is available in PyGTK 2.6 and above.

The `gtk.CellView` is a widget that displays one row of a `gtk.TreeModel`. `gtk.CellView` implements the `gtk.CellLayout` interface that provides for the addition and management of `gtk.CellRenderer` objects.

## Constructor

        gtk.CellView()

Returns : | a new `gtk.CellView`

### Note

This constructor is available in PyGTK 2.6 and above.

Creates a new `gtk.CellView` widget.

## Methods

### gtk.CellView.set_model

        def set_model(model)

`model` : | a `gtk.TreeModel` or `None`

### Note

This method is available in PyGTK 2.6 and above.

The `set_model`() method sets the `gtk.TreeModel` used by the cell view to that specified by `model`. If `model` is `None` the cell view's model will be unset.

### gtk.CellView.set_displayed_row

        def set_displayed_row(path)

`path` : | a tree path or `None` to unset the row

### Note

This method is available in PyGTK 2.6 and above.

The `set_displayed_row`() method sets the row of the model that is currently displayed to the path specified by `path`. If `path` is `None` the display row will be unset, and the contents of the cell view "stick" at their last value. This is not normally a desired result, but may be a needed intermediate state if say, the model for the cell view becomes temporarily empty.

### gtk.CellView.get_displayed_row

        def get_displayed_row()

Returns : | the path of the currently displayed row in the cell view's model

### Note

This method is available in PyGTK 2.6 and above.

The `get_displayed_row`() method returns the path of the currently displayed row as set by the `set-displayed_row`() method.

### gtk.CellView.get_size_of_row

        def get_size_of_row(path)

`path` : | the path of a row
Returns : | a `gtk.Requisition` containing the required size data

### Note

This method is available in PyGTK 2.6 and above.

The `get_size_of_row`() method returns a `gtk.Requisition` containing the size required for displaying the row with the tree path specified by `path`.

### gtk.CellView.set_background_color

        def set_background_color(color)

`color` : |

### Note

This method is available in PyGTK 2.6 and above.

The `set_background_color`() method sets the background color of the cell view to the `gtk.gdk.Color` specified by `color`.

### gtk.CellView.get_cell_renderers

        def get_cell_renderers()

Returns : | a list of the `gtk.CellRenderer` objects of the cell view.

### Note

This method is available in PyGTK 2.6 and above.

The `get_cell_renderers`() method returns a list containing the `gtk.CellRenderer` objects used by the cell view.

## Functions

### gtk.cell_view_new_with_text

        def gtk.cell_view_new_with_text(text)

`text` : | a string
Returns : | a new `gtk.CellView`

### Note

This function is available in PyGTK 2.6 and above.

The `gtk.cell_view_new_with_text`() function creates a new `gtk.CellView` with a `gtk.CellRendererText` displaying the string specified by `text`.

### gtk.cell_view_new_with_markup

        def gtk.cell_view_new_with_markup(markup)

`markup` : | a string containing Pango markup to be displayed.
Returns : | a new `gtk.CellView`

### Note

This function is available in PyGTK 2.6 and above.

The `gtk.cell_view_new_with_markup`() function creates a new `gtk.CellView` with a `gtk.CellRendererText` displaying the Pango markup specified by `markup`.

### gtk.cell_view_new_with_pixbuf

        def gtk.cell_view_new_with_pixbuf(pixbuf)

`pixbuf` : | a `gtk.gdk.Pixbuf`
Returns : | a new `gtk.CellView`

### Note

This function is available in PyGTK 2.6 and above.

The `gtk.cell_view_new_with_pixbuf`() function creates a new `gtk.CellView` with a `gtk.CellRendererPixbuf` displaying the `gtk.gdk.Pixbuf` specified by `pixbuf`.

Prev | Up | Next
gtk.CellRendererToggle | Home | gtk.CheckButton