AGW Logo

agw_title XLSBackground

This is a class which holds information about the cell background, in terms of background colour and background pattern (hatching).

hierarchy Inheritance Diagram

Inheritance diagram for: XLSBackground

Inheritance diagram of XLSBackground


method_summary Methods Summary

__init__Default class constructor.
CombineAttrCombines the input attribute attr with the features of the XLSBackground class.
CreateBackgroundColourCreates a suitable wxPython colour for the cell background starting from
DrawActually draws the cell background and pattern hatching on a grid cell.

API Class API

class XLSBackground(object)[source]

This is a class which holds information about the cell background, in terms of background colour and background pattern (hatching).



__init__(book, xf_index)[source]

Default class constructor.

Parameters:
  • book – an instance of the xlrd.Book class;
  • xf_index – an index into xlrd.Book.xf_list, which holds a reference to the xlrd.sheet.Cell class (the actual cell for xlrd).


CombineAttr(attr)[source]

Combines the input attribute attr with the features of the XLSBackground class.

Parameters:attr – an instance of wx.grid.GridCellAttr.


CreateBackgroundColour(background_colour, pattern_colour, fill_pattern)[source]

Creates a suitable wxPython colour for the cell background starting from a xlrd tuple representing this colour.

Parameters:
  • background_colour – a tuple representing the RGB components of the cell background colour. If background_colour is None, use the default wx.SYS_COLOUR_WINDOW;
  • pattern_colour – a tuple representing the RGB components of the cell pattern colour;
  • fill_pattern – the pattern to use to draw hatches on top of the background.


Draw(dc, rect)[source]

Actually draws the cell background and pattern hatching on a grid cell.

Parameters:
  • dc – an instance of wx.DC;
  • rect – an instance of wx.Rect, representing the cell rectangle.
Tree

Table Of Contents

Previous topic

TransientPopup

Next topic

XLSBorder