little demo updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15812 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -107,7 +107,7 @@ class DoodlePad(wxWindow):
|
|||||||
dropSource = wxDropSource(self)
|
dropSource = wxDropSource(self)
|
||||||
dropSource.SetData(data)
|
dropSource.SetData(data)
|
||||||
self.log.WriteText("Begining DragDrop\n")
|
self.log.WriteText("Begining DragDrop\n")
|
||||||
result = dropSource.DoDragDrop(true)
|
result = dropSource.DoDragDrop(wxDrag_AllowMove)
|
||||||
self.log.WriteText("DragDrop completed: %d\n" % result)
|
self.log.WriteText("DragDrop completed: %d\n" % result)
|
||||||
if result == wxDragMove:
|
if result == wxDragMove:
|
||||||
self.lines = []
|
self.lines = []
|
||||||
|
@@ -85,9 +85,9 @@ else:
|
|||||||
EVT_ERASE_BACKGROUND(self, self.OnEraseBackground)
|
EVT_ERASE_BACKGROUND(self, self.OnEraseBackground)
|
||||||
EVT_SIZE(self, self.OnSize)
|
EVT_SIZE(self, self.OnSize)
|
||||||
EVT_PAINT(self, self.OnPaint)
|
EVT_PAINT(self, self.OnPaint)
|
||||||
#EVT_LEFT_DOWN(self, self.OnMouseDown) # needs fixing...
|
EVT_LEFT_DOWN(self, self.OnMouseDown) # needs fixing...
|
||||||
#EVT_LEFT_UP(self, self.OnMouseUp)
|
EVT_LEFT_UP(self, self.OnMouseUp)
|
||||||
#EVT_MOTION(self, self.OnMouseMotion)
|
EVT_MOTION(self, self.OnMouseMotion)
|
||||||
|
|
||||||
def OnEraseBackground(self, event):
|
def OnEraseBackground(self, event):
|
||||||
pass # Do nothing, to avoid flashing on MSW.
|
pass # Do nothing, to avoid flashing on MSW.
|
||||||
@@ -116,7 +116,7 @@ else:
|
|||||||
if evt.Dragging() and evt.LeftIsDown():
|
if evt.Dragging() and evt.LeftIsDown():
|
||||||
self.x, self.y = self.lastx, self.lasty
|
self.x, self.y = self.lastx, self.lasty
|
||||||
self.x, self.y = evt.GetPosition()
|
self.x, self.y = evt.GetPosition()
|
||||||
self.Refresh()
|
self.Refresh(false)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -14,7 +14,7 @@ class TestPanel(wxPanel):
|
|||||||
wxPoint(20, 30))
|
wxPoint(20, 30))
|
||||||
|
|
||||||
wxStaticText(self, -1, "Is this yellow?",
|
wxStaticText(self, -1, "Is this yellow?",
|
||||||
wxPoint(20, 70)).SetBackgroundColour(wxNamedColour('Yellow'))
|
wxPoint(20, 70)).SetBackgroundColour('Yellow')
|
||||||
|
|
||||||
str = "This is a different font."
|
str = "This is a different font."
|
||||||
text = wxStaticText(self, -1, str, wxPoint(20, 100))
|
text = wxStaticText(self, -1, str, wxPoint(20, 100))
|
||||||
|
Reference in New Issue
Block a user