wx.URLDataObject¶
wx.URLDataObject is a wx.DataObject containing an URL and can be used e.g.
when you need to put an URL on or retrieve it from the clipboard:
wx.TheClipboard.SetData(wx.URLDataObject(url))
Note
The actual base class of this class is not always wx.DataObject itself, but rather either wx.DataObjectComposite in wxMSW and wxGTK or wx.TextDataObject in the other ports. Please don’t rely on the exact base class, it is not guaranteed that it won’t change in the future.
See also
Class Hierarchy¶
Methods Summary¶
Constructor, may be used to initialize the URL. |
|
Returns a list of wx.DataFormat objects which this data object |
|
Returns the URL stored by this object, as a string. |
|
Sets the URL stored by this object. |
Properties Summary¶
See |
|
Class API¶
- class wx.URLDataObject(DataObject)¶
Possible constructors:
URLDataObject(url='') -> None
URLDataObject is a DataObject containing an URL and can be used e.g.
Methods¶
- __init__(self, url='')¶
Constructor, may be used to initialize the URL.
If url is empty,
SetURL
can be used later.- Parameters:
url (string)
- Return type:
None
- GetAllFormats(self, dir=DataObject.Get)¶
Returns a list of wx.DataFormat objects which this data object supports transferring in the given direction.
- Return type:
Any
- GetURL(self)¶
Returns the URL stored by this object, as a string.
- Return type:
str
- SetData(self, format, buf)¶
- Return type:
bool
- SetURL(self, url)¶
Sets the URL stored by this object.
- Parameters:
url (string)
- Return type:
None
Properties¶
- AllFormats¶
See
GetAllFormats