Aaron,
I binding to wx.EVT_MOUSE_EVENTS onece the drag has started, however,
the dragging event still does not fire while dragging. I also tested my
previous code out (using mylist.Bind(wx.EVT_LIST_COL_DRAGGING,
self.OnColDragging)) last night on my Ubuntu 7.10 machine with python
2.5 and wxpython 2.8.7.1 and the event is being sent correctly.
import wx
class Main(wx.Frame):
def __init__(self, parent, id, title):
wx.Frame.__init__(self, parent, -1, title)
self.mylist = wx.ListCtrl(self, -1, style=wx.LC_REPORT)
self.mylist.InsertColumn(0, "Column 0")
self.mylist.InsertColumn(1, "Column 1")
self.mylist.InsertColumn(2, "Column 2")
#self.mylist.Bind(wx.EVT_LIST_COL_DRAGGING,
self.OnColDragging)
self.mylist.Bind(wx.EVT_LIST_COL_BEGIN_DRAG,
self.OnBeginDrag)
self.mylist.Bind(wx.EVT_LIST_COL_END_DRAG,
self.OnEndDrag)
sizer = wx.BoxSizer()
sizer.Add(self.mylist, 1, wx.EXPAND)
self.SetSizer(sizer)
self.Center()
self.Show()
def OnColDragging(self, event):
print "I'm being dragged"
def OnBeginDrag(self, event):
print "Begin drag"
self.mylist.Bind(wx.EVT_MOUSE_EVENTS,
self.OnColDragging)
def OnEndDrag(self, event):
print "end drag"
self.mylist.Bind(wx.EVT_MOUSE_EVENTS, None)
app = wx.App()
frame = Main(None, -1, "Test Column Dragging")
app.MainLoop()
-Kyle Rickey
···
-----Original Message-----
From: Aaron Brady [mailto:castironpi@comcast.net]
Sent: Wednesday, January 09, 2008 5:41 PM
To: wxPython-users@lists.wxwidgets.org
Subject: RE: [wxPython-users] wx.EVT_LIST_COL_DRAGGING problem
-----Original Message-----
From: Rickey, Kyle W [mailto:Kyle.Rickey@bakerhughes.com]
Sent: Wednesday, January 09, 2008 5:38 PM
To: wxPython-users@lists.wxwidgets.org
Subject: RE: [wxPython-users] wx.EVT_LIST_COL_DRAGGING problem
I've got no problem capturing wx.EVT_LIST_COL_BEGIN_DRAG and
wx.EVT_LIST_COL_END_DRAG, but I need the event that is continuously
sent
while dragging.
Still thinking workaround, why not sink OnMouseMove for now?
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org