GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||
GeezerVison is showing docs.wxpython.org — wx.TextDataObject — wxPython 4.3.2 Docs
|
Constructor, may be used to initialise the text (otherwise |
|
Returns a list of wx.DataFormat objects which this data object |
|
Returns the preferred format supported by this object. |
|
Returns 2 under Mac and wxGTK, where text data coming from the clipboard may be provided as ( |
|
Returns the text associated with the data object. |
|
Sets the text associated with the data object. |
Properties Summary¶See |
|
See |
|
See |
|
See |
Class API¶Possible constructors:
TextDataObject(text='') -> None
TextDataObject is a specialization of DataObjectSimple for text data.
Constructor, may be used to initialise the text (otherwise SetText should be used later).
text (string)
None
Returns a list of wx.DataFormat objects which this data object supports transferring in the given direction.
Any
Returns the preferred format supported by this object.
This is DF_TEXT or DF_UNICODETEXT depending on the platform.
Returns 2 under Mac and wxGTK, where text data coming from the clipboard may be provided as ( DF_TEXT ), in ANSI (wxGTK) or UTF8 (wxMac), or as Unicode text ( DF_UNICODETEXT ).
Returns 1 under other platforms (e.g. wxMSW).
dir (DataObject.Direction)
int
Returns the text associated with the data object.
You may wish to override this method when offering data on-demand, but this is not required by wxWidgets’ internals. Use this method to get data in text form from the wx.Clipboard.
str
Don’t use or call this function, it simply returns the length of the text plus one for compatibility purposes.
int
bool
Sets the text associated with the data object.
This method is called when the data object receives the data and, by default, copies the text into the member variable. If you want to process the text on the fly you may wish to override this function.
strText (string)
None
See GetAllFormats
See GetFormatCount
See GetTextLength