My application has a wx.ComboBox that works when I run the script
through Python, but once I bundle the app (using GUI2EXE) the combobox
doesn't stay open when the user opens the list. So instead of being
able to click and release the mouse and select the item, it requires
the user to hold the mouse button down as they navigate the list.
Why would building the application change this behaviour? Earlier
versions of this app did not have this problem. The changes I made had
nothing to do with the combobox.
I even made a small test app with just a combobox, but I can't
recreate the problem yet.
I'm using Python 2.5.4 on win32, wxPython 2.8.9.2 (msw-unicode).
My application has a wx.ComboBox that works when I run the script
through Python, but once I bundle the app (using GUI2EXE) the combobox
doesn't stay open when the user opens the list. So instead of being
able to click and release the mouse and select the item, it requires
the user to hold the mouse button down as they navigate the list.
Why would building the application change this behaviour? Earlier
versions of this app did not have this problem. The changes I made had
nothing to do with the combobox.
I even made a small test app with just a combobox, but I can't
recreate the problem yet.
I'm using Python 2.5.4 on win32, wxPython 2.8.9.2 (msw-unicode).
Any suggestions?
Building the application shouldn't cause that. Add in the Widget Inspection Tool and enable the event watching functionality. My guess is that some extra event is firing (like a focus event) that is causing this to happen. I have several python programs bundled into executables with GUI2Exe that include comboboxes and I don't think I've ever seen that.
Wow. I didn't think my version of the inspector had the events thing.
Too bad it doesn't have an export feature, or I wouldn't have to copy
it all down by hand:
When tracking the combo box, I get these events when selecting an
item. This is the version that works.
EVT_SET_FOCUS
EVT_KILL_FOCUS
EVT_CHILD_FOCUS
EVT_SET_FOCUS
EVT_SET_CURSOR
EVT_LEFT_DOWN
EVT_LEAVE_WINDOW
EVT_MOTION
EVT_MOUSE_CAPTURE CHANGED
EVT_LEFT_UP
EVT_COMBOBOX
EVT_TEXT
EVT_KILL_FOCUS
But in the compiled app:
EVT_CHILD_FOCUS
EVT_SET_FOCUS
EVT_KILL_FOCUS
EVT_CHILD_FOCUS
EVT_SET_FOCUS
EVT_SET CURSOR
EVT_LEFT_DOWN
EVT_LEAVE_WINDOW
EVT_MOTION
EVT_MOUSE_CAPTURE_CHANGED
EVT_COMBOBOX
EVT_TEXT
EVT_SET_CURSOE
EVT_ENTER_WINDOW
EVT_MOTION
EVT_SET_CURSOR
repeat those several times until...
EVT_KILL_FOCUS
The box with the arrow that pops up the list keeps it's selected look.
I've attached a small jpg that shows the problem. The Application is
running in front, and the thing looks like it's still being selected.
The one in the background is the script running, and the button looks
normal.
Right now I guess the application version button isn't releasing, It
doesn't catch the Left up event, but still selects whatever was
highlighted in the and selects it, and collapes the list.
Very strange.
I am binding both EVT_COMBOBOX and EVT_TEXT_ENTER to the combobox,
which is created with the TE_PROCESS_ENTER and WANTS_CHARS flags.
On Fri, Apr 17, 2009 at 2:32 PM, Mike Driscoll <mike@pythonlibrary.org> wrote:
Building the application shouldn't cause that. Add in the Widget Inspection
Tool and enable the event watching functionality. My guess is that some
extra event is firing (like a focus event) that is causing this to happen. I
have several python programs bundled into executables with GUI2Exe that
include comboboxes and I don't think I've ever seen that.
Wow. I didn't think my version of the inspector had the events thing.
Too bad it doesn't have an export feature, or I wouldn't have to copy
it all down by hand:
When tracking the combo box, I get these events when selecting an
item. This is the version that works.
EVT_SET_FOCUS
EVT_KILL_FOCUS
EVT_CHILD_FOCUS
EVT_SET_FOCUS
EVT_SET_CURSOR
EVT_LEFT_DOWN
EVT_LEAVE_WINDOW
EVT_MOTION
EVT_MOUSE_CAPTURE CHANGED
EVT_LEFT_UP
EVT_COMBOBOX
EVT_TEXT
EVT_KILL_FOCUS
But in the compiled app:
EVT_CHILD_FOCUS
EVT_SET_FOCUS
EVT_KILL_FOCUS
EVT_CHILD_FOCUS
EVT_SET_FOCUS
EVT_SET CURSOR
EVT_LEFT_DOWN
EVT_LEAVE_WINDOW
EVT_MOTION
EVT_MOUSE_CAPTURE_CHANGED
EVT_COMBOBOX
EVT_TEXT
EVT_SET_CURSOE
EVT_ENTER_WINDOW
EVT_MOTION
EVT_SET_CURSOR
repeat those several times until...
EVT_KILL_FOCUS
The box with the arrow that pops up the list keeps it's selected look.
I've attached a small jpg that shows the problem. The Application is
running in front, and the thing looks like it's still being selected.
The one in the background is the script running, and the button looks
normal.
Right now I guess the application version button isn't releasing, It
doesn't catch the Left up event, but still selects whatever was
highlighted in the and selects it, and collapes the list.
Very strange.
Strange indeed...I wonder why the event structure is different. Are you using the latest py2exe? Hopefully someone else will jump in here...
0.6.9, according to the __init__ file. Sourceforge doesn't have a
later version listed that I can see.
I'm pretty sure I use that version or the one right before it at work...so that's probably not it. You might try the py2exe guys and see if they know anything off the top of their heads. It certainly couldn't hurt as nothing is jumping to my mind at the moment. Sorry!
- Mike
···
On Fri, Apr 17, 2009 at 3:59 PM, Mike Driscoll <mike@pythonlibrary.org> wrote:
Strange indeed...I wonder why the event structure is different. Are you
using the latest py2exe? Hopefully someone else will jump in here...
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4018 (20090418) __________
Okay, things are getting stranger. I built the old version using
py2exe and a command line, and now the old version of the program has
the same behavior.
It has occured to me that the machine I work on has been wiped and
completely redone between building the last version and this new
version. Maybe I had a different version of python or wxPython. My
network geek asked me to reinstall everything fresh, which I did.
I am scanning the py2exe archives and will ask them.
Josh
···
On Fri, Apr 17, 2009 at 5:35 PM, Mike Driscoll <mike@pythonlibrary.org> wrote:
Josh English wrote:
0.6.9, according to the __init__ file. Sourceforge doesn't have a
later version listed that I can see.
I'm pretty sure I use that version or the one right before it at work...so
that's probably not it. You might try the py2exe guys and see if they know
anything off the top of their heads. It certainly couldn't hurt as nothing
is jumping to my mind at the moment. Sorry!
- Mike
On Fri, Apr 17, 2009 at 3:59 PM, Mike Driscoll <mike@pythonlibrary.org> >> wrote:
Strange indeed...I wonder why the event structure is different. Are you
using the latest py2exe? Hopefully someone else will jump in here...
__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4018 (20090418) __________
Even more debugging. We found that if the popup menu is large enough
that it has to be drawn both above and below the combobox, the box
breaks. However, the list of items is large enough for the popup box
to have a scroll bar, the box works.
Even better, I now have a sample script that works when run in the
IDE, but fails once built.
My application has a wx.ComboBox that works when I run the script
through Python, but once I bundle the app (using GUI2EXE) the combobox
doesn't stay open when the user opens the list. So instead of being
able to click and release the mouse and select the item, it requires
the user to hold the mouse button down as they navigate the list.
Why would building the application change this behaviour? Earlier
versions of this app did not have this problem. The changes I made had
nothing to do with the combobox.
I even made a small test app with just a combobox, but I can't
recreate the problem yet.
I'm using Python 2.5.4 on win32, wxPython 2.8.9.2 (msw-unicode).
Any suggestions?
Do you include a manifest in the py2exe version so the new version of the common controls DLL will be used? If not then you will be dealing with two different versions of the native widget and that could explain this behavior. One test you could do is to remove the python.exe.manifest file that wxPython installs next to your python.exe and see if running the script version then has the same problem.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Including the XP manifest file solves the problem.
Wow.
I had no idea that was necessary. I thought it only mattered for the
look and feel of buttons and that sort of thing. I guess that is a
different version of the native widget.
Thank you, O grand master of wx!
Josh
···
On Tue, Apr 21, 2009 at 1:30 PM, Robin Dunn <robin@alldunn.com> wrote:
Do you include a manifest in the py2exe version so the new version of the
common controls DLL will be used? If not then you will be dealing with two
different versions of the native widget and that could explain this
behavior. One test you could do is to remove the python.exe.manifest file
that wxPython installs next to your python.exe and see if running the script
version then has the same problem.