[wxPython] Copying to the clipboard

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[wxPython] Copying to the clipboard

Pieter Claerhout-3
Hello,

I don't know if this question is really related to wxPython or not,
but what is the easiest way to copy the contents of the wxHTMLWindow
to the windows clipboard?

Thankx.


Pieter

Pieter Claerhout - [hidden email]
Response Center - Applications Support

Creo Europe - Excelsiorlaan 21 - 1930 Zaventem - Belgium
Tel: +32 (2) 711 14 00 - Fax: +32 (2) 720 96 71


_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users



Reply | Threaded
Open this post in threaded view
|

Re: [wxPython] Copying to the clipboard

Robin Dunn
>
> I don't know if this question is really related to wxPython or not,
> but what is the easiest way to copy the contents of the wxHTMLWindow
> to the windows clipboard?
>


        self.dataobj = wxTextDataObject()
        self.dataobj.SetText(htmlwin.GetParser().GetSource())
        wxTheClipboard.Open()
        wxTheClipboard.SetData(self.dataobj)
        wxTheClipboard.Close()

--
Robin Dunn
Software Craftsman
[hidden email]
http://AllDunn.com/robin/
http://AllDunn.com/wxPython/  Check it out!



_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users