This is a class which holds information about the cell content, in terms
of actual cell value, font, text colour, alignment and formatting. In addition
to what XLSText
does, this class attempts to handle cells with rich text
content.
__init__ |
Default class constructor. |
BuildChunks |
Splits the cell content accordingly to their rich text format index. |
Draw |
Actually draws all the chunks of text on a grid cell, one by one. |
Measure |
Convenience method to measure the maximum height and total width of all |
XLSRichText
(XLSText)¶This is a class which holds information about the cell content, in terms
of actual cell value, font, text colour, alignment and formatting. In addition
to what XLSText
does, this class attempts to handle cells with rich text
content.
__init__
(self, book, cell, xf_index, display_text=None, hyperlink=None, rich_text=None, default_width=10)¶Default class constructor.
Parameters: |
|
---|
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, this class will
note be used by XLSGrid
.
Warning
This class currently supports only single-line non-rotated text, and it discards properties like shrink-to-fit and wrapping.
BuildChunks
(self, book, xf_index, rich_text)¶Splits the cell content accordingly to their rich text format index.
Parameters: |
|
---|
Draw
(self, dc, rect)¶Actually draws all the chunks of text on a grid cell, one by one.
Parameters: |
---|