Hi All,
I have created a sample app and I found that this only happens if u use the the style wx.TR_MULTIPLE…
if u start dragging u can see the that begin drag is fired twice…
import wx
class Frame1(wx.Frame):
def init (self, parent):
wx.Frame.init (self, id=101, name=’’, parent=parent,
pos=wx.Point(198, 198), size=wx.Size(400, 250),
style=wx.DEFAULT_FRAME_STYLE, title=‘Frame1’)
self.SetClientSize(wx.Size(392, 223))
self.treeCtrl1 = wx.TreeCtrl(id=102, name='treeCtrl1',
parent=self, pos=wx.Point(16, 16), size=wx.Size(248, 176),
style=wx.TR_HAS_BUTTONS|wx.TR_MULTIPLE)
self.treeCtrl1.AddRoot("Upload/Download",image = -1, data =None)
self.treeCtrl1.Bind(wx.EVT_TREE_BEGIN_DRAG,
self.OnTreeCtrl1TreeBeginDrag, id=102)
def OnTreeCtrl1TreeBeginDrag(self, event):
print "calling begin drag"
event.Skip()
class BoaApp(wx.App):
def OnInit(self):
wx.InitAllImageHandlers()
self.main = Frame1(None)
self.main.Show()
self.SetTopWindow(self.main)
return True
def main():
application = BoaApp(0)
application.MainLoop()
if name == ‘main ’:
main()
···
Thomas Thomas
phone +64 7 855 8478
fax +64 7 855 8871
Thomas Thomas wrote:
Hi All,
I have created a sample app and I
found that this only happens if u use the the style wx.TR_MULTIPLE…
if u start dragging u can see the
that begin drag is fired twice…
I tried your sample, and only see the “calling begin drag” once:
wxPython version: 2.6.1.0
Python version: 2.4.1 (#65 , Mar 30 2005, 09:13:57) [MSC v.1310 32 bit
(Intel)]
Platform: win32
···
-- Alex Tweedly
http://www.tweedly.net
Hello Thomas,
I am getting the same results as you. begin drag is is called twice. May it be a bug of 2.6.3.2? !?
This is Python 2.4.3, wxPython 2.6.3.2 , Windows XP.
Andrea.
···
On 5/8/06, Alex Tweedly alex@tweedly.net wrote:
Thomas Thomas wrote:
Hi All,
I have created a sample app and I found that this only happens if u use the the style wx.TR_MULTIPLE…
if u start dragging u can see the that begin drag is fired twice…
I tried your sample, and only see the “calling begin drag” once:
wxPython version:
2.6.1.0
Python version: 2.4.1 (#65 , Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)]
Platform: win32
-- Alex Tweedly [http://www.tweedly.net](http://www.tweedly.net/)
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.5.5/333 - Release Date: 05/05/2006
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
–
“Imagination Is The Only Weapon In The War Against Reality.”
http://xoomer.virgilio.it/infinity77/
Robin
May 12, 2006, 2:28am
4
Thomas Thomas wrote:
Hi All,
I have created a sample app and I found that this only happens if u use the the style wx.TR_MULTIPLE..
if u start dragging u can see the that begin drag is fired twice..
def OnTreeCtrl1TreeBeginDrag(self, event):
print "calling begin drag"
event.Skip()
I don't have a Windows machine with me at the moment so I can't test this, but try removing the event.Skip()
···
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!