User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Python section within the Software Development category of DaniWeb, a massive community of 391,555 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,620 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Python advertiser:
Views: 1227 | Replies: 4 | Solved
Reply
Join Date: Oct 2006
Location: New York City
Posts: 2,553
Reputation: mattyd is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 1
Featured Poster
mattyd's Avatar
mattyd mattyd is offline Offline
Posting Maven

Tkinter GUI Issues:

  #1  
Feb 8th, 2007
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?
http://i52.photobucket.com/albums/g3...r/untitled.jpg

Thank-you in advance for any help\direction offered,
Matty
Last edited by mattyd : Feb 8th, 2007 at 2:50 am.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2005
Posts: 132
Reputation: mawe is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 33
mawe mawe is offline Offline
Junior Poster

Re: Tkinter GUI Issues:

  #2  
Feb 8th, 2007
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
Reply With Quote  
Join Date: Aug 2005
Posts: 1,004
Reputation: Ene Uran is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 64
Ene Uran's Avatar
Ene Uran Ene Uran is offline Offline
Veteran Poster

Re: Tkinter GUI Issues:

  #3  
Feb 8th, 2007
Unless you have a huge amount of events in your loop, it could very well be your mouse.
drink her pretty
Reply With Quote  
Join Date: Jun 2005
Posts: 142
Reputation: G-Do is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 11
G-Do's Avatar
G-Do G-Do is offline Offline
Junior Poster

Re: Tkinter GUI Issues:

  #4  
Feb 9th, 2007
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.
Vi veri veniversum vivus vici
Reply With Quote  
Join Date: Oct 2006
Location: New York City
Posts: 2,553
Reputation: mattyd is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 1
Featured Poster
mattyd's Avatar
mattyd mattyd is offline Offline
Posting Maven

Re: Tkinter GUI Issues:

  #5  
Feb 9th, 2007
Originally Posted by Ene Uran View Post
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
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Python Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Python Forum

All times are GMT -4. The time now is 9:34 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC