Bug fixes, new tests and demos, new generated source...
Added FileBrowseButton class to the library git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4682 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -8,8 +8,6 @@ class ClipTextPanel(wxPanel):
|
||||
wxPanel.__init__(self, parent, -1)
|
||||
self.log = log
|
||||
|
||||
self.do = wxTextDataObject()
|
||||
|
||||
#self.SetFont(wxFont(10, wxSWISS, wxNORMAL, wxBOLD, false))
|
||||
|
||||
sizer = wxBoxSizer(wxVERTICAL)
|
||||
@@ -35,6 +33,7 @@ class ClipTextPanel(wxPanel):
|
||||
|
||||
|
||||
def OnCopy(self, evt):
|
||||
self.do = wxTextDataObject()
|
||||
self.do.SetText(self.text.GetValue())
|
||||
wxTheClipboard.Open()
|
||||
wxTheClipboard.SetData(self.do)
|
||||
@@ -42,11 +41,12 @@ class ClipTextPanel(wxPanel):
|
||||
|
||||
|
||||
def OnPaste(self, evt):
|
||||
do = wxTextDataObject()
|
||||
wxTheClipboard.Open()
|
||||
success = wxTheClipboard.GetData(self.do)
|
||||
success = wxTheClipboard.GetData(do)
|
||||
wxTheClipboard.Close()
|
||||
if success:
|
||||
self.text.SetValue(self.do.GetText())
|
||||
self.text.SetValue(do.GetText())
|
||||
else:
|
||||
wxMessageBox("There is no data in the clipboard in the required format",
|
||||
"Error")
|
||||
|
Reference in New Issue
Block a user