This commit was manufactured by cvs2svn to create tag 'WX_2_8_3'.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/tags/WX_2_8_3@44921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Bryan Petty
2007-03-19 12:50:38 +00:00
parent 0d3847e80c
commit ddae8107b7
440 changed files with 11219 additions and 10751 deletions

View File

@@ -0,0 +1,49 @@
import wx
import wx.grid
##import os; print os.getpid(); raw_input("press enter...")
class TestFrame(wx.Frame):
def __init__(self, *args, **kw):
wx.Frame.__init__(self, *args, **kw)
self.grid = wx.grid.Grid(self)
self.grid.CreateGrid(10,10)
self.grid.EnableDragCell(True)
self.grid.Bind(wx.grid.EVT_GRID_CELL_BEGIN_DRAG, self.OnBeginDrag)
#self.grid.GetGridWindow().Bind(wx.EVT_MOTION, self.OnMouseDrag)
def OnBeginDrag(self, evt):
print "OnBeginDrag"
# The grid window has the mouse captured when this event is sent??
if self.grid.GetGridWindow().HasCapture():
print "Releasing capture"
self.grid.GetGridWindow().ReleaseMouse()
src = wx.DropSource(self.grid)
data = wx.TextDataObject("This is a test")
src.SetData(data)
result = src.DoDragDrop()
print "result = %d" % result
def OnMouseDrag(self, evt):
if not evt.Dragging():
evt.Skip()
return
print "OnMouseDrag"
src = wx.DropSource(self.grid)
data = wx.TextDataObject("This is a test")
src.SetData(data)
result = src.DoDragDrop()
print "result = %d" % result
from wx.lib.mixins.inspection import InspectableApp
app = InspectableApp(False)
app.Init()
frm = TestFrame(None, title="EVT_GRID_CELL_BEGIN_DRAG")
frm.Show()
app.MainLoop()