wx.richtext.RichTextCell is the cell in a table, in which the user can type.
As well as text, it can also contain objects e.g. an image, or even another wx.richtext.RichTextTable.
A cell’s appearance can be changed via its associated wx.richtext.RichTextAttr; for example its size altered or its background colour set. It also has the properties of column- and row-span. By default these are 1, meaning that the cell only spans itself, but can be increased using the SetColSpan
and SetRowSpan
methods. Attempts to set too large a span are silently truncated to the table edge.
Default constructor; optionally pass the parent object. |
|
Returns |
|
Clones the object. |
|
Draw the item, within the given range. |
|
Edits the object’s properties via a GUI. |
|
Returns the number of columns spanned by the cell. |
|
Returns the label to be used for the properties context menu item. |
|
Returns the number of rows spanned by the cell. |
|
Returns the |
|
Hit-testing: returns a flag indicating hit test details, plus information about position. |
|
Set the number of columns spanned by the cell. |
|
Set the number of rows spanned by the cell. |
See |
|
See |
|
See |
wx.richtext.
RichTextCell
(RichTextBox)¶Possible constructors:
RichTextCell(parent=None)
RichTextCell(obj)
RichTextCell is the cell in a table, in which the user can type.
__init__
(self, *args, **kw)¶__init__ (self, parent=None)
Default constructor; optionally pass the parent object.
parent (wx.richtext.RichTextObject) –
__init__ (self, obj)
Copy constructor.
obj (wx.richtext.RichTextCell) –
CanEditProperties
(self)¶Returns True
if we can edit the object’s properties via a GUI.
bool
Clone
(self)¶Clones the object.
Copy
(self, obj)¶obj (wx.richtext.RichTextCell) –
Draw
(self, dc, context, range, selection, rect, descent, style)¶Draw the item, within the given range.
Some objects may ignore the range (for example paragraphs) while others must obey it (lines, to implement wrapping)
dc (wx.DC) –
context (wx.richtext.RichTextDrawingContext) –
range (wx.richtext.RichTextRange) –
selection (wx.richtext.RichTextSelection) –
rect (wx.Rect) –
descent (int) –
style (int) –
bool
EditProperties
(self, parent, buffer)¶Edits the object’s properties via a GUI.
parent (wx.Window) –
buffer (wx.richtext.RichTextBuffer) –
bool
GetColSpan
(self)¶Returns the number of columns spanned by the cell.
By default a cell doesn’t span extra columns, so this function returns 1.
int
New in version 2.9.5.
See also
GetPropertiesMenuLabel
(self)¶Returns the label to be used for the properties context menu item.
string
GetRowSpan
(self)¶Returns the number of rows spanned by the cell.
By default a cell doesn’t span extra rows, so this function returns 1.
int
New in version 2.9.5.
See also
GetXMLNodeName
(self)¶Returns the XML
node name of this object.
This must be overridden for XmlNode-base XML
export to work.
string
HitTest
(self, dc, context, pt, flags=0)¶Hit-testing: returns a flag indicating hit test details, plus information about position.
contextObj is returned to specify what object position is relevant to, since otherwise there’s an ambiguity. @ obj might not be a child of contextObj, since we may be referring to the container itself if we have no hit on a child - for example if we click outside an object.
The function puts the position in textPosition if one is found. pt is in logical units (a zero y position is at the beginning of the buffer).
dc (wx.DC) –
context (wx.richtext.RichTextDrawingContext) –
pt (wx.Point) –
flags (int) –
tuple
( int, textPosition, obj, contextObj )
SetColSpan
(self, span)¶Set the number of columns spanned by the cell.
By default colspan is 1 i.e. a cell doesn’t span extra columns. Pass a value >1 to change this. Attempting to set a colspan <1 will assert and be ignored.
span (long) –
New in version 2.9.5.
See also
SetRowSpan
(self, span)¶Set the number of rows spanned by the cell.
By default colspan is 1 i.e. a cell doesn’t span extra rows. Pass a value >1 to change this. Attempting to set a rowspan <1 will assert and be ignored.
span (long) –
New in version 2.9.5.
See also
ColSpan
¶See GetColSpan
and SetColSpan
PropertiesMenuLabel
¶RowSpan
¶See GetRowSpan
and SetRowSpan
XMLNodeName
¶See GetXMLNodeName