WxPython exit button doesn´t always works - python

I am using a code designed by another person in MAC OS. I am using Windows instead and have slightly modified it, but the problem comes when using the GUI that is created.
I have already dealt with a similar issue with a slider. Once I pressed the slider, I couldn´t release it or press another button. I was forced to quit the GUI and start again. I solved it by changing the event command from EVT_COMMAND_SCROLL to EVT_COMMAND_SCROLL_THUMBTRACK. However I did not understand why it worked in MAC OS and does not work in Windows.
Now, I want to close the GUI with the typical cross inside the red button in the right corner of the window. I can do it if it is the first order I do in the GUI. If I first press any button or slider, the exit button does not work.
It made me consider if a major problem is hidden in the code which I am not seeing. I am new at wxPython, which is the module used in the code.
I just ask for your opinion and hope it is a basic error.
Thanks very much

Related

Pygame window wont move or close after using tkinter

I have had this problem for ages now with many different projects now, so I really want to find out how to fix it. For example, in one of my projects, I created a level editor for a game. The level editor had the option to save and load different levels from a file using tkinter.filedialog.
Now after I select the file, the game will still work, but the 'X' close button doesn't work anymore, and I can't move the window.
The game itself works as usual, and I can still interact with everything inside of the window, but I can't move or close the window.
Thanks in advance.
Ok. I figured this one out. The problem went away when I called the tkinter functions from a key press, not a mouse press.

PyQT Buttons do not get focus on first click

I am having a problem with all the QPushButton buttons in my PyQt application.
For some reason, even if the window has focus, the first click on a button will not register (no 'click affect' or button action occurs). Following this, as though it now has focus, I can click the button, or any other button, on the first go. As soon as the focus changes to another non-button widget, again none of the buttons will click on the first attempt.
Update:
This issue was present for maybe 4 months. After continuing to try everything I could find online and nothing working, I gave up. After about 2 weeks, the issue randomly disappeared.
I have not made any intentional changes to package versions, but it's possible the issue was fixed in a minor version update of PySide. It has now been good for a few weeks so I am convinced it is solved :)
The version of PySide I am currently using is 5.15.1, I'm not sure if this is the same as before but can confirm the issue is not present here

Tkinter GUI buttons become invisible after creating app using Py2App

I built a small GUI using Tkinter. The GUI features, among some other elements, three buttons. These buttons serve to open a dystem dialog and select certain data-files etc. One of the three buttons is a 'Go' button that runs the underlying data-processing.
When running the .py script the GUI works fine. However, after creating a developer app in alias mode using Py2App the buttons have become invisible! They're still there and usable, but invisible until interacted with.
How can I prevent this from happening?
I was stuck in your exact situation for quite some time. When I ran my tkinter script, it worked perfectly and all the buttons showed up, but once I packaged it, the buttons stopped showing up (They were still there but you couldn't see them). After a long time of trying random things, I found out how to make the buttons and their text show up again. Simply resize the window. Even a difference of 1 or 2 pixels does the trick. I have not yet found a way to PREVENT this issue, but at least this makes the app look right.
Please reply if you figure out a solution to prevent this!
Good Luck!

easygui CLOSE button (on top right of window) not functioning

i have created a chat system in python, using easygui for graphical user interface.
there are minimize,maximize and close button on top right of window,but the close button is not functioning at all.i just can use the exit button which i created to close the application. i had some search and found there is a problem with easygui, so is it totally impossible to fix this problem? or how can i remove that close button from top right as there is no use for it. its final year project and i'm afraid my advisor and supervisor want try that button and i lose mark because of no function
is there anyway to fix it or at least remove that close button?
This is likely past the due date for your assignment...sorry. But, that was a known limitation of easygui. An up-to-date version with a fix for that will be released soon. If you can't wait, you can take a look at it in development form: https://github.com/robertlugg/easygui

PySide Button Auto Repeat doesn't start until mouse is moved

I have a PySide application with a single button that implements auto-repeat. But the auto-repeat functionality doesn't seem to be working correctly.
If I simply click and hold the button, its function is only called once no matter how long I wait or what the auto-repeat settings are. But as soon as I move the mouse, the button's functionality is called repeatedly, just as it should be.
This is with Python 2.6, PySide 1.1.2, running on Windows 7 64 bit.
self.btn.setAutoRepeat(True)
self.btn.setAutoRepeatDelay(200)
self.btn.setAutoRepeatInterval(100)
I was having a similar problem using normal QT4.x on linux. The issue was that something was connected to the clicked signal. I think it was stealing/changing the focus of the mouse. I just changed that item to connect to the the released signal. That doesn't mean you can't connect to clicked, but just be sure that there are no focus stealing side-effects.

Categories

Resources