mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-08 21:10:06 +01:00
- Add the `DataObject` overview; - Correct some missing link to the print dialog overview; - Add converted snippets for wx.Sound, wx.DataObject and friends. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@71472 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
21 lines
627 B
Python
21 lines
627 B
Python
|
|
# Write some text to the clipboard
|
|
if wx.TheClipboard.Open():
|
|
|
|
# This data objects are held by the clipboard,
|
|
# so do not delete them in the app.
|
|
wx.TheClipboard.SetData(wx.TextDataObject("Some text"))
|
|
wx.TheClipboard.Close()
|
|
|
|
# Read some text
|
|
if wx.TheClipboard.Open():
|
|
|
|
if wx.TheClipboard.IsSupported(wx.DF_TEXT):
|
|
|
|
data = wx.TextDataObject()
|
|
wx.TheClipboard.GetData(data)
|
|
wx.MessageBox(data.GetText())
|
|
|
|
wx.TheClipboard.Close()
|
|
|