if the wx application doesn't have focus,
clicking on a tree, the tree change event works directly.
But when clicking on a button (while the wx application doesn't have focus),
the first click doesn't generate an wx.EVT_BUTTON.
Is there a way to prevent that or
is there another event that acts directly ?
As far as I know that behavior (click pass-through to non-active windows) is totally dependent on the platform, although I think there is some low-level stuff that could be done on Windows to change the from the default behavior for a specific window. Not in wx though.
···
On 11/13/10 11:34 AM, Stef Mientki wrote:
hello,
if the wx application doesn't have focus,
clicking on a tree, the tree change event works directly.
But when clicking on a button (while the wx application doesn't have focus),
the first click doesn't generate an wx.EVT_BUTTON.
Is there a way to prevent that or
is there another event that acts directly ?
Having the same problem in PyJamas a few weeks ago,
I just remembered the solution there: don't use click events (which are highly pre-processed, but
just use mouse-down).
So I did some experiments and found that this solution also works in wxPython,
instead if binding the buttons to an EVT_BUTTON,
binding them to EVT_LEFT_DOWN seems to todo the trick.
cheers,
Stef
···
On 14-11-2010 07:44, Robin Dunn wrote:
On 11/13/10 11:34 AM, Stef Mientki wrote:
hello,
if the wx application doesn't have focus,
clicking on a tree, the tree change event works directly.
But when clicking on a button (while the wx application doesn't have focus),
the first click doesn't generate an wx.EVT_BUTTON.
Is there a way to prevent that or
is there another event that acts directly ?
As far as I know that behavior (click pass-through to non-active windows) is totally dependent on
the platform, although I think there is some low-level stuff that could be done on Windows to
change the from the default behavior for a specific window. Not in wx though.