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 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
|
.. 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.XLSCell:
==========================================================================================================================================
|phoenix_title| **wx.lib.agw.xlsgrid.XLSCell**
==========================================================================================================================================
This is a class which holds information about a single cell in :class:`XLSGrid`.
It stores (via auxiliary classes), all details about cell background, text,
font, colours and borders.
|
|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>XLSCell</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.XLSCell_inheritance.png" alt="Inheritance diagram of XLSCell" 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.XLSCell.html" title="wx.lib.agw.xlsgrid.XLSCell" alt="" coords="5,5,184,35"/> </map>
</p>
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.lib.agw.xlsgrid.XLSCell.__init__` Default class constructor.
:meth:`~wx.lib.agw.xlsgrid.XLSCell.GetAttr` Returns the attribute to use for this specific cell.
:meth:`~wx.lib.agw.xlsgrid.XLSCell.GetComment` Returns the cell comment, if any.
:meth:`~wx.lib.agw.xlsgrid.XLSCell.GetValue` Returns the actual WYSIWYG representation of the cell value.
:meth:`~wx.lib.agw.xlsgrid.XLSCell.SetCellSize` Sets the size of the cell.
:meth:`~wx.lib.agw.xlsgrid.XLSCell.SetupCell` Actually sets up the :class:`XLSCell` class. This is an auxiliary method to
:meth:`~wx.lib.agw.xlsgrid.XLSCell.SetValue` Sets the actual WYSIWYG representation of the cell value.
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: XLSCell(object)
This is a class which holds information about a single cell in :class:`XLSGrid`.
It stores (via auxiliary classes), all details about cell background, text,
font, colours and borders.
.. method:: __init__(self, book, cell, xf_index, xls_text, xls_comment, hyperlink, rich_text, default_width, default_colour)
Default class constructor.
:param `book`: an instance of the `xlrd.Book` class;
:param `cell`: an instance of `xlrd.sheet.Cell` 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`);
:param `xls_text`: the actual WYSIWYG cell text, if available;
:param `xls_comment`: the cell comment (note), if any;
:param `hyperlink`: an instance of `xlrd.sheet.hyperlink`;
:param `rich_text`: if this cell contains text in rich text format, :class:`XLSGrid`
will do its best to render the text as rich text;
:param `default_width`: this is the default width of the text in 1/256
of the width of the zero character, using default Excel font (first FONT
record in the Excel file);
:param `default_colour`: the "magic" colour used by Excel to draw non-custom
border lines.
:note: If you are using version 0.7.1 or lower for `xlrd`, the *hyperlink*
parameter will always be ``None`` as this feature is available only in
`xlrd` 0.7.2 (SVN).
:note: If you are using version 0.7.1 or lower for `xlrd`, the `rich_text`
parameter will always be ``None`` as this feature is available only in
`xlrd` 0.7.2 (SVN).
:note: if Mark Hammonds' `pywin32` package is not available, the `xls_text`
parameter will almost surely not be the WYSIWYG representation of the cell
text.
:note: If Mark Hammonds' `pywin32` package is not available, the `xls_comment`
parameter will always be ``None``.
.. method:: GetAttr(self)
Returns the attribute to use for this specific cell.
:returns: an instance of :class:`grid.GridCellAttr`.
.. method:: GetComment(self)
Returns the cell comment, if any.
:returns: an instance of :class:`XLSComment`.
:note: If Mark Hammonds' `pywin32` package is not available, this method
always returns ``None``.
.. method:: GetValue(self)
Returns the actual WYSIWYG representation of the cell value.
.. method:: SetCellSize(self, rows, cols)
Sets the size of the cell.
Specifying a value of more than 1 in `rows` or `cols` will make the cell
at (`row`, `col`) span the block of the specified size, covering the other
cells which would be normally shown in it. Passing 1 for both arguments
resets the cell to normal appearance.
:param `rows`: number of rows to be occupied by this cell, must be >= 1;
:param `cols`: number of columns to be occupied by this cell, must be >= 1.
.. method:: SetupCell(self, book, cell, xf_index, xls_text, xls_comment, hyperlink, rich_text, default_width, default_colour)
Actually sets up the :class:`XLSCell` class. This is an auxiliary method to
avoid cluttering the :meth:`~xlsgrid.XLSCell.__init__` method.
:param `book`: an instance of the `xlrd.Book` class;
:param `cell`: an instance of `xlrd.sheet.Cell` 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`);
:param `xls_text`: the actual WYSIWYG cell text, if available;
:param `xls_comment`: the cell comment (note), if any;
:param `hyperlink`: an instance of `xlrd.sheet.hyperlink`;
:param `rich_text`: if this cell contains text in rich text format, :class:`XLSGrid`
will do its best to render the text as rich text;
:param `default_width`: this is the default width of the text in 1/256
of the width of the zero character, using default Excel font (first FONT
record in the Excel file);
:param `default_colour`: the "magic" colour used by Excel to draw non-custom
border lines.
:note: If you are using version 0.7.1 or lower for `xlrd`, the *hyperlink*
parameter will always be ``None`` as this feature is available only in
`xlrd` 0.7.2 (SVN).
:note: If you are using version 0.7.1 or lower for `xlrd`, the `rich_text`
parameter will always be ``None`` as this feature is available only in
`xlrd` 0.7.2 (SVN).
:note: if Mark Hammonds' `pywin32` package is not available, the `xls_text`
parameter will almost surely not be the WYSIWYG representation of the cell
text.
:note: If Mark Hammonds' `pywin32` package is not available, the `xls_comment`
parameter will always be ``None``.
.. method:: SetValue(self, value)
Sets the actual WYSIWYG representation of the cell value.
:param `value`: the current text value to insert in the cell.
:note: This method is currently unused as everything is handled inside the :class:`XLSText` class.
:see: :meth:`~xlsgrid.XLSCell.GetValue`
|