Well, it wasn't so hard to make a small example. Luckily (I guess?) it reproduces our problem. You will have to drag the second tab over to the right, like in the attached picture.
The second tab is selected. Clicking Open from the toolbar, and double clicking on qvi.pth, which is next to a tree item, will cause tab 1 to be selected. However double clicking LICENSE.txt will not cause the issue since it is below tree items.
This is confusing to me as, as I recall, tabs don't do any selecting of themselves when focus is made to their children. We had to implement that ourselves. So what is happening here? What kind of patch can we make to this example?
Thanks so much for taking the time to look at this and help us out!
- Mike
test.py (1.28 KB)
···
-----Original Message-----
From: Rooney, Mike (ext. 324) [mailto:mxr@qvii.com]
Sent: Wednesday, February 14, 2007 9:58 AM
To: wxPython-users@lists.wxwidgets.org
Subject: RE: [wxPython-users] double-clicking in FileDialog skips event?
We have narrowed it down a litte. We have CustomTreeCtrl's in the tabs, and the AuiNotebook's EVT_TAB_CHANGED is getting called. However this only happens when the file that was double clicked is over a tree item. For example if I drag the open dialog down to below the last item of the tree and double click, everything is fine. But when the file double clicked from the dialog is on or next to a tree item, it happens. We have print statements everywhere we are manually changing the tab selection and none of those are firing. We also have print statements in all our event handlers in tree with items and clicks, but none of those are doing it either. This is confusing!
This probably is either something really dumb we are doing, or some incredibly complex buried issue with an AuiNotebook or CustomTreeCtrl!
Does this trigger any more memories or ideas you might have? I can try to duplicate this in a little example if necessary but it might not be so easy.
-----Original Message-----
From: Robin Dunn [mailto:robin@alldunn.com]
Sent: Wednesday, February 14, 2007 3:08 AM
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] double-clicking in FileDialog skips event?
Pangborn, Andrew (ext. 324) wrote:
In short, is this a bug where the Double-click seems to get propogated
to the panel/frame beneath the modal FileDialog after a double-click? Or
more importatly, is there any way I can get around this (maybe by
creating a new dialog that inherits from FileDialog?) and prevent that
double-click from selecting the AUINotebook tab beneath it?
Basically, what's happening is that the dialog is closing itself on the
down-stroke of the second part of the double click, leaving the
up-stroke part of the event to be caught by whatever window is
underneath it. I usually work around this by setting a flag or
something that causes my underlying window to ignore that event, but
where this is a AUINotebook and not under your control I'm not sure what
to suggest. Maybe temporarily connecting your own event handler so you
can ignore that event, and then disconnecting it...
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org