.. include:: headings.inc .. _URLDataObject: ========================================================================================================================================== |phoenix_title| **URLDataObject** ========================================================================================================================================== :ref:`URLDataObject` is a :ref:`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:: This class is derived from :ref:`DataObjectComposite` on Windows rather than :ref:`TextDataObject` on all other platforms. .. seealso:: :ref:`Drag and Drop Overview `, :ref:`DataObject` | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **URLDataObject** .. raw:: html

Inheritance diagram of URLDataObject

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~URLDataObject.__init__` Constructor, may be used to initialize the ``URL``. :meth:`~URLDataObject.GetAllFormats` Returns a list of wx.DataFormat objects which this data object supports :meth:`~URLDataObject.GetURL` Returns the ``URL`` stored by this object, as a string. :meth:`~URLDataObject.SetURL` Sets the ``URL`` stored by this object. ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~URLDataObject.AllFormats` See :meth:`~URLDataObject.GetAllFormats` :attr:`~URLDataObject.URL` See :meth:`~URLDataObject.GetURL` and :meth:`~URLDataObject.SetURL` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: URLDataObject(DataObject) URLDataObject is a DataObject containing an ``URL`` and can be used e.g. **Possible constructors**:: URLDataObject(url='') .. method:: __init__(self, url='') Constructor, may be used to initialize the ``URL``. If `url` is empty, :meth:`SetURL` can be used later. :param `url`: :type `url`: string .. method:: GetAllFormats(self, dir=DataObject::Get) Returns a list of wx.DataFormat objects which this data object supports transfering in the given direction. :rtype: `PyObject` .. method:: GetURL(self) Returns the ``URL`` stored by this object, as a string. :rtype: `string` .. method:: SetURL(self, url) Sets the ``URL`` stored by this object. :param `url`: :type `url`: string .. attribute:: AllFormats See :meth:`~URLDataObject.GetAllFormats` .. attribute:: URL See :meth:`~URLDataObject.GetURL` and :meth:`~URLDataObject.SetURL`