Table of Contents

Class: DisplayGrid PmwContribD-r2_0_1/displaygrid.py

Widget to show tabular data.

Base Classes   
Pmw.LabeledWidget
Methods   
__init__
cellValueGet
makeCell
newColumn
setValue
  __init__ 
__init__ (
        self,
        parent=None,
        **kw,
        )

Create a DisplayGrid.

Options

ipadx

Internal X padding.

ipady

Internal Y padding.

columnlabels

Sequence of labels to use for the column headings. Required.

rowlabels

Sequence of labels to use for rows. Optional.

cellvaluefunc

Function which returns the value of a cell (see below).

Cell Value Function Interface

The DisplayGrid retrieves values for a cell one at a time. To do this, the user must supply a cellvaluefunc when the widget is instantiated. The function provided must accept two arguments, row and column.

For example:

            def cellValueFunc(row, column):
                return str(row + column)

  cellValueGet 
cellValueGet (
        self,
        row,
        column,
        )

  makeCell 
makeCell (
        self,
        master,
        text=' ',
        side=Tkinter.TOP,
        expand=Tkinter.NO,
        fill=Tkinter.X,
        relief=Tkinter.GROOVE,
        bd=1,
        **kw,
        )

Create a cell in a column with: master: the frame representing the column text: the value which should be displayed side, expand, fill, relief, bd: standard Tkinter pack options other options: other options to be sent to configure for the new cell widget

  newColumn 
newColumn ( self,  label=' ' )

Create a new column, with a label.

  setValue 
setValue (
        self,
        row,
        column,
        newVal,
        )

Set the value displayed in a specific (row, column) of the DisplayGrid.


Table of Contents

This document was automatically generated on Mon Sep 17 17:47:46 2001 by HappyDoc version r2_0