1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
|
.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2018 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. currentmodule:: wx.lib.agw.xlsgrid
.. highlight:: python
.. _wx.lib.agw.xlsgrid.XLSBackground:
==========================================================================================================================================
|phoenix_title| **wx.lib.agw.xlsgrid.XLSBackground**
==========================================================================================================================================
This is a class which holds information about the cell background, in terms
of background colour and background pattern (hatching).
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html
<div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
<img id="toggleBlock-trigger" src="_static/images/closed.png"/>
Inheritance diagram for class <strong>XLSBackground</strong>:
</div>
<div id="toggleBlock-summary" style="display:block;"></div>
<div id="toggleBlock-content" style="display:none;">
<p class="graphviz">
<center><img src="_static/images/inheritance/wx.lib.agw.xlsgrid.XLSBackground_inheritance.png" alt="Inheritance diagram of XLSBackground" usemap="#dummy" class="inheritance"/></center>
</div>
<script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
<map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.agw.xlsgrid.XLSBackground.html" title="wx.lib.agw.xlsgrid.XLSBackground" alt="" coords="5,5,237,35"/> </map>
</p>
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.lib.agw.xlsgrid.XLSBackground.__init__` Default class constructor.
:meth:`~wx.lib.agw.xlsgrid.XLSBackground.CombineAttr` Combines the input attribute `attr` with the features of the :class:`XLSBackground` class.
:meth:`~wx.lib.agw.xlsgrid.XLSBackground.CreateBackgroundColour` Creates a suitable wxPython colour for the cell background starting from
:meth:`~wx.lib.agw.xlsgrid.XLSBackground.Draw` Actually draws the cell background and pattern hatching on a grid cell.
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: XLSBackground(object)
This is a class which holds information about the cell background, in terms
of background colour and background pattern (hatching).
.. method:: __init__(self, book, xf_index)
Default class constructor.
:param `book`: an instance of the `xlrd.Book` class;
:param `xf_index`: an index into `xlrd.Book.xf_list`, which holds a
reference to the `xlrd.sheet.Cell` class (the actual cell for `xlrd`).
.. method:: CombineAttr(self, attr)
Combines the input attribute `attr` with the features of the :class:`XLSBackground` class.
:param `attr`: an instance of :class:`grid.GridCellAttr`.
.. method:: CreateBackgroundColour(self, background_colour, pattern_colour, fill_pattern)
Creates a suitable wxPython colour for the cell background starting from
a `xlrd` tuple representing this colour.
:param `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``;
:param `pattern_colour`: a tuple representing the RGB components of the
cell pattern colour;
:param `fill_pattern`: the pattern to use to draw hatches on top of the
background.
.. method:: Draw(self, dc, rect)
Actually draws the cell background and pattern hatching on a grid cell.
:param `dc`: an instance of :class:`wx.DC`;
:param `rect`: an instance of :class:`wx.Rect`, representing the cell rectangle.
|