I have two questions regarding Tkinter GUIs:

  1. I have three buttons in a GUI; at times it seems that the buttons "stick". By this I mean when the mouse is clicked on one it may activate or it may not. They all work correctly in regards to there function(s) but it sometimes takes 2-3 clicks to actually get it to fully respond; I figure that this may have to do with my system, memory resources, or something of that nature. The way in which they tend to not resond sometimes is completely random it seems. Has anyone had this issue before and if so, is their a technique to fix this via code optimization?
  2. Is there a way to change the color\theme of the border of a frame such as the silver border in the GUI pictured below? This is just a small detail but I would like to be able to have this choice if possible for graphic design reasons. I believe I have read that the color\theme of such a GUI element is system dependent, in this case, Windows XP (the same silver color\theme as my system) Is this indeed true that Tkinter does not allow adjustment of said GUI elements?

[IMG]http://i52.photobucket.com/albums/g31/reranger/untitled.jpg[/IMG]

Thank-you in advance for any help\direction offered,
Matty

Hi!

Ad 1: Show some code ;)

Ad 2: Tkinter isn't responsible for the window decorations, but your window-manager is. So, no, it is not possilbe to change them from Tkinter.

Regards, mawe

Unless you have a huge amount of events in your loop, it could very well be your mouse.

commented: Tkiner GUI #Always helpful ;) mattyd +3

Hi mattyd,

Does that image represent a pygame game wrapped inside a Tkinter widget? Is that what you're trying to do?

Running pygame and Tkinter together can be tricky, as both open new threads that listen for user input, and threading bugs are always the hardest to squash. Without seeing the code, I can't tell you exactly what's wrong; my suggestion would be to try decoupling the pygame module from the Tkinter module and see if the problem persists (in other words, comment out the entire game loop and pygame initialization code, put `print "FLAG"; return` commands in the beginning of each button function, and see if "stickiness" is still an issue). Of course, if you're not mixing pygame and Tkinter please say so and I will reconsider the problem.

Hope that helps.

commented: tkinter GUI| #thanks for your help ;) mattyd +3

Unless you have a huge amount of events in your loop, it could very well be your mouse.

Not a lot of events. Think it could be the optical mouse. Changed batteries-- works much better.

Thanks, Ene
MattyD

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.