]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/wxPython/demo/DragAndDrop.py
Fixed bug in DnD. wxDragSource will now delete itself when done.
[wxWidgets.git] / utils / wxPython / demo / DragAndDrop.py
index 0fd84b781f72c7e2689f9a78603b970ace097077..f389bf80b9490c1ba311cffd6242e7c323b37362 100644 (file)
@@ -149,9 +149,12 @@ class TestPanel(wxPanel):
         self.SetAutoLayout(true)
         outsideSizer = wxBoxSizer(wxVERTICAL)
 
+        msg = "Clipboard / Drag-And-Drop"
         text = wxStaticText(self, -1, "", style=wxALIGN_CENTRE)
         text.SetFont(wxFont(24, wxSWISS, wxNORMAL, wxBOLD, false))
-        text.SetLabel("Clipboard / Drag-And-Drop")
+        text.SetLabel(msg)
+        w,h = text.GetTextExtent(msg)
+        text.SetSize(wxSize(w,h+1))
         text.SetForegroundColour(wxBLUE)
         outsideSizer.Add(text, 0, wxEXPAND|wxALL, 5)
         outsideSizer.Add(wxStaticLine(self, -1), 0, wxEXPAND)