wx.richtext.RichTextTable represents a table with arbitrary columns and rows.
Default constructor; optionally pass the parent object. |
|
Returns |
|
Adds columns from the given column position. |
|
Adds rows from the given row position. |
|
Calculates the range of the object. |
|
Returns |
|
Clears the table. |
|
Clones the object. |
|
Creates a table of the given dimensions. |
|
Deletes columns from the given column position. |
|
Deletes the given range. |
|
Deletes rows from the given row position. |
|
Draw the item, within the given range. |
|
Edits the object’s properties via a GUI. |
|
Finds the absolute position and row height for the given character position. |
|
Returns the cell at the given row/column position. |
|
Returns the row/column for a given character position. |
|
Returns the cells array. |
|
Returns the column count. |
|
Returns the coordinates of the cell with keyboard focus, or (-1,-1) if none. |
|
Returns the label to be used for the properties context menu item. |
|
Returns the object size for the given range. |
|
Returns the row count. |
|
Returns a selection object specifying the selections between start and end character positions. |
|
Returns any text in this object for the given range. |
|
Returns the |
|
Returns |
|
Hit-testing: returns a flag indicating hit test details, plus information about position. |
|
Imports this object from |
|
Lay the item out at the specified position with the given size constraint. |
|
Sets the attributes for the cells specified by the selection. |
See |
|
See |
|
See |
|
See |
|
See |
Possible constructors:
RichTextTable(parent: Optional[RichTextObject]=None) -> None
RichTextTable(obj : RichTextTable) -> None
RichTextTable represents a table with arbitrary columns and rows.
__init__ (self, parent: Optional[RichTextObject]=None)
Default constructor; optionally pass the parent object.
parent (wx.richtext.RichTextObject)
None
__init__ (self, obj : RichTextTable)
Copy constructor.
None
Returns True
if objects of this class can accept the focus, i.e. a call to SetFocusObject is possible.
For example, containers supporting text, such as a text box object, can accept the focus, but a table can’t (set the focus to individual cells instead).
bool
Adds columns from the given column position.
startCol (int)
noCols (int)
attr (wx.richtext.RichTextAttr)
bool
Adds rows from the given row position.
startRow (int)
noRows (int)
attr (wx.richtext.RichTextAttr)
bool
Calculates the range of the object.
By default, guess that the object is 1 unit long.
start (long)
int
Returns True
if we can edit the object’s properties via a GUI.
bool
Clears the table.
None
Clones the object.
None
Creates a table of the given dimensions.
rows (int)
cols (int)
bool
Deletes columns from the given column position.
startCol (int)
noCols (int)
bool
Deletes the given range.
range (wx.richtext.RichTextRange)
bool
Deletes rows from the given row position.
startRow (int)
noRows (int)
bool
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
Edits the object’s properties via a GUI.
parent (wx.Window)
buffer (wx.richtext.RichTextBuffer)
bool
Finds the absolute position and row height for the given character position.
dc (wx.DC)
context (wx.richtext.RichTextDrawingContext)
index (long)
forceLineStart (bool)
le[bool, wx.Point, int]
GetCell (self, row : int, col : int)
Returns the cell at the given row/column position.
row (int)
col (int)
GetCell (self, pos : int)
Returns the cell at the given character position (in the range of the table).
pos (long)
Returns the row/column for a given character position.
pos (long)
row (int)
col (int)
bool
Returns the cells array.
RichTextObjectPtrArrayArray
Returns the column count.
int
Returns the coordinates of the cell with keyboard focus, or (-1,-1) if none.
Position
Returns the label to be used for the properties context menu item.
str
Returns the object size for the given range.
Returns False
if the range is invalid for this object.
range (wx.richtext.RichTextRange)
size (wx.Size)
descent (int)
dc (wx.DC)
context (wx.richtext.RichTextDrawingContext)
flags (int)
position (wx.Point)
parentSize (wx.Size)
partialExtents (list of integers)
bool
Returns the row count.
int
Returns a selection object specifying the selections between start and end character positions.
For example, a table would deduce what cells (of range length 1) are selected when dragging across the table.
start (long)
end (long)
Returns any text in this object for the given range.
range (wx.richtext.RichTextRange)
str
Returns the XML
node name of this object.
This must be overridden for XmlNode-base XML
export to work.
str
Returns True
if this object can handle the selections of its children, fOr example a table.
Required for composite selection handling to work.
bool
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, int, RichTextObject, RichTextObject]
One of the wx.richtext.RichTextHitTestFlags values.
Imports this object from XML
.
buffer (wx.richtext.RichTextBuffer)
node (wx.xml.XmlNode)
handler (wx.richtext.RichTextXMLHandler)
recurse (bool)
bool
Lay the item out at the specified position with the given size constraint.
Layout must set the cached size. rect is the available space for the object, and parentRect is the container that is used to determine a relative size or position (for example if a text box must be 50% of the parent text box).
dc (wx.DC)
context (wx.richtext.RichTextDrawingContext)
rect (wx.Rect)
parentRect (wx.Rect)
style (int)
bool
Sets the attributes for the cells specified by the selection.
selection (wx.richtext.RichTextSelection)
style (wx.richtext.RichTextAttr)
flags (int)
bool
See GetColumnCount
See GetFocusedCell
See GetRowCount
See GetXMLNodeName