spreadsheet Package

spreadsheet Package

abstract_grid_view Module

default_renderer Module

class pyface.wx.spreadsheet.default_renderer.DefaultRenderer(color='black', font='ARIAL', fontsize=8)

Bases: wx.grid.PyGridCellRenderer

This renderer provides the default representation of an Enthought spreadsheet cell.

Clone()
Draw(grid, attr, dc, rect, row, col, isSelected)
DrawBackground(grid, attr, dc, rect, row, col, isSelected)

Erases whatever is already in the cell by drawing over it.

DrawEllipses(grid, attr, dc, rect, row, col, isSelected)

Adds three dots ”...” to indicate the cell is truncated.

DrawForeground(grid, attr, dc, rect, row, col, isSelected)

Draws the cell (text) on top of the existing background color.

FormatText(text)

Formats numbers to 3 decimal places.

GetBestSize88(grid, attr, dc, row, col)

This crashes the app - hmmmm.

error_cells = <wx._gdi.Brush; proxy of <Swig Object of type 'wxBrush *' at 0x9718648> >
normal_cells = <wx._gdi.Brush; proxy of <Swig Object of type 'wxBrush *' at 0x8f04050> >
odd_cells = <wx._gdi.Brush; proxy of <Swig Object of type 'wxBrush *' at 0x8f2a408> >
selected_cells = <wx._gdi.Brush; proxy of <Swig Object of type 'wxBrush *' at 0x8f0da50> >
warn_cells = <wx._gdi.Brush; proxy of <Swig Object of type 'wxBrush *' at 0x8ddec80> >

font_renderer Module

class pyface.wx.spreadsheet.font_renderer.FontRenderer(color='black', font='ARIAL', fontsize=8)

Bases: pyface.wx.spreadsheet.default_renderer.DefaultRenderer

Render data in the specified color and font and fontsize.

DrawForeground(grid, attr, dc, rect, row, col, isSelected)
DrawOld(grid, attr, dc, rect, row, col, isSelected)
class pyface.wx.spreadsheet.font_renderer.FontRendererFactory88(color, font, fontsize)

I don’t grok why this Factory (which I copied from the wx demo) was ever necessary?

unit_renderer Module

class pyface.wx.spreadsheet.unit_renderer.MultiUnitRenderer(color='black', font='ARIAL', fontsize=8, suppress_warnings=False)

Bases: pyface.wx.spreadsheet.default_renderer.DefaultRenderer

DrawBackground(grid, attr, dc, rect, row, col, isSelected)

Erases whatever is already in the cell by drawing over it.

DrawForeground(grid, attr, dc, rect, row, col, isSelected)
class pyface.wx.spreadsheet.unit_renderer.UnitRenderer(color='black', font='ARIAL', fontsize=8)

Bases: pyface.wx.spreadsheet.default_renderer.DefaultRenderer

DrawBackground(grid, attr, dc, rect, row, col, isSelected)

Erases whatever is already in the cell by drawing over it.

DrawForeground(grid, attr, dc, rect, row, col, isSelected)

virtual_model Module

class pyface.wx.spreadsheet.virtual_model.VirtualModel(data, column_names)

Bases: wx.grid.PyGridTableBase

A custom wxGrid Table that expects a user supplied data source. THIS CLASS IS NOT LIMITED TO ONLY DISPLAYING LOG DATA!

AppendRow(row)

Append a tupe containing (name, data)

DeleteCols88(cols)

cols -> delete the columns from the dataset cols hold the column indices

DeleteRow(row)
DeleteRows88(rows)

rows -> delete the rows from the dataset rows hold the row indices

GetAttr88(row, col, someExtraParameter)
GetColLabelValue(col)
GetNumberCols()
GetNumberRows()
GetRawValue(row, col)
GetRowLabelValue(row)
GetValue(row, col)
ResetView(grid)

(wxGrid) -> Reset the grid view. Call this to update the grid if rows and columns have been added or deleted

SetValue(row, col, value)
SortColumn88(col)

to do - never tested tried to rename data to _data and _data to _tmp_data col -> sort the data based on the column indexed by col

UpdateValues(grid)

Update all displayed values

get_data_source()

The data structure we provide the data in.

set_data_source(source)

Table Of Contents

Previous topic

wx Package

This Page