evt_left_up problem

I am hitting my head against a wall I don't see what I am doing wrong.

I have a dialog (call it 'A') which contains beside other controls a treelist, it binds to evt_left_up as shown below.

        treeWindow = self.image.tree.GetMainWindow()
        treeWindow.Bind(wx.EVT_LEFT_UP, self.OnLeftUp, treeWindow)

    def OnLeftUp(self, evt):
        self.SetStatusText('')

The dialog also has a button which calls another dialog (call it 'B') to select from a listctrl. Now when I double click on this listctrl the OnLeftUp for the treelist is fired too. But this only happens if the dialog 'B' is on top of the tree list ctrl. If I move it to another section of the screen the event does not fire.

I first guessed this might be a Win7 "enhancement" but I also see it on Vista, so I am back to my code but I can just not see what is wrong.

I am very open to any ideas:).

Werner

Hi Werner,

···

2009/11/8 werner <wbruhin@free.fr>:

The dialog also has a button which calls another dialog (call it 'B') to
select from a listctrl. Now when I double click on this listctrl the
OnLeftUp for the treelist is fired too. But this only happens if the
dialog 'B' is on top of the tree list ctrl. If I move it to another
section of the screen the event does not fire.

I have seen this too, with other types of controls. I fixed it by
checking whether the control that received part of the double click
actually had the focus.

Cheers, Frank

Hi Frank,

Frank Niessink wrote:

Hi Werner,

The dialog also has a button which calls another dialog (call it 'B') to
select from a listctrl. Now when I double click on this listctrl the
OnLeftUp for the treelist is fired too. But this only happens if the
dialog 'B' is on top of the tree list ctrl. If I move it to another
section of the screen the event does not fire.
    
I have seen this too, with other types of controls. I fixed it by
checking whether the control that received part of the double click
actually had the focus.

Thanks a lot, that work around does the trick for me.

Werner

···

2009/11/8 werner <wbruhin@free.fr>: