Ed Leafe пишет:
On Oct 28, 2006, at 3:14 AM, Basil Shubin wrote:
1.2. And how to catch left double click?
Bind to GridMouseLeftDoubleClick.
I've trying bind event outside dGrid subclass:
self.gridTowns = GridTowns(self.panel, style=wx.SUNKEN_BORDER)
self.resource.AttachUnknownControl('gridTowns', self.gridTowns,
self.panel)
self.panel.Bind(dabo.dEvents.GridMouseLeftDoubleClick,
self.OnDoubleLeftClick,
self.gridTowns)
and got this error:
[snip]
AttributeError: type object 'GridMouseLeftDoubleClick' has no
attribute 'Bind'
You're confusing the wxPython Bind() function with Dabo's
bindEvent() function. The correct syntax would be:
self.gridTowns.bindEvent(dabo.dEvents.GridMouseLeftDoubleClick,
self.onDoubleLeftClick)
For each left button double click it has generate two events. How I can
disable second event raise? For example when I double click on dGrid row
I got dialog box for editing, but when I close it, it appears again,
because of two same event in a queue.
--
Basil Shubin
Freelance Software Developer
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users