[wxPython-users] problems with events

Werner F. Bruhin werner.bruhin at free.fr
Fri Mar 2 02:11:25 PST 2007


Hi Fatima,

fatima cabot wrote:
> Hi. I am a Computer Science student doing her final year project.
>
> It consists on an GUI written in python. I chose wxpython as my 
> graphic library, but I am experimenting many problems handling events. 
> I want to display some bitmapbuttons which are centered on the screen 
> after the user presses one button. I have set the 'hover' method for 
> every button in order for it to display a differente image when mouse 
> is over.I have also written code to allow the user to see the x,y 
> coordinates when he presses the panel and there is an option in the 
> menu which also changes the image in the bitmapbutton
>
> The problems are:
>
> .-Not every time the user presses the panel, coordinates are 
> displayed. Sometimes the value is displayed, other times the value 
> keep on being the former one
Do you have some sample code (which is runnable) showing this problem?
> .-When the user presses the button, bitmapbuttons are not centered, 
> they just move when the user selects the other option in the menu 
> (then both changes are applied to the bitmapbuttons: movement and 
> image changed)
Again, do you have some sample code.
> .-The hover image is not displayed (I have checked it does in Windows, 
> but not in Ubuntu)
Maybe a problem with the widget you use on Ubuntu (gtk?).
> .-Even when the event seems to be well handled, I feel reaction time 
> is slow (my pc is a laptop which has 512 Mb of RAM and an Intel 
> Centrino) and my application is a bit time-critical (real-time 
> simulation)
Is the real-time simulation in a separate thread?  Check the wiki on 
long running task:
http://wiki.wxpython.org/index.cgi/LongRunningTasks?highlight=%28running%29%7C%28long%29

Werner




More information about the wxpython-users mailing list