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 375,231 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,193 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: Nov 2006
Posts: 23
Reputation: Haze is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
Haze Haze is offline Offline
Newbie Poster

Re: Python GUI Problem

  #5  
Aug 19th, 2007
i these are the two variations of the function i use.

def disable(widget):
     widget(state = disabled)

def disable(widget):
     widget(state = DISABLED)

i then changed the command to look like this

root.input_menu.add_radiobutton(label='Input From File', variable = input_option, command = disable(root.input_text))


this command with the first functions gives this error

root.input_menu.add_radiobutton(label='Input From File', variable = input_option, command = disable(root.input_text))
line 4, in disable
widget(state = disabled)
NameError: global name 'disabled' is not defined


the second function gives this error

root.input_menu.add_radiobutton(label='Input From File', variable = input_option, command = disable(root.input_text))
line 4, in disable
widget(state = DISABLED)
TypeError: 'NoneType' object is not callable

i also tried using a simple function with no variables but this gave the same errors as the last 2 depending on if i used caps to write disabled.
Last edited by Haze : Aug 19th, 2007 at 7:35 am.
Reply With Quote  
All times are GMT -4. The time now is 4:05 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC