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 362,354 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 4,551 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:

Python GUI Problem

Join Date: Jul 2006
Posts: 551
Reputation: jrcagle is on a distinguished road 
Rep Power: 3
Solved Threads: 69
jrcagle jrcagle is offline Offline
Posting Pro

Re: Python GUI Problem

  #6  
Aug 19th, 2007
Right, you want to pass the NAME of the function:

  1. def disable():
  2. root.input_text["state"] = DISABLED
  3.  
  4. root.input_menu.add_radiobutton(label='Input From File', variable = input_option, command = disable)

What you're doing is calling the function *when* you add the radiobutton, then setting command = return value.

Remember that the () operator means "call the function now."

Jeff
Reply With Quote  
All times are GMT -4. The time now is 11:30 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC