tkinter get widget option value

rahulnag22 at yahoo.com rahulnag22 at yahoo.com
Wed May 9 15:59:08 EDT 2007


On May 8, 6:51 pm, James Stroud <jstr... at mbi.ucla.edu> wrote:
> rahulna... at yahoo.com wrote:
> > Hi,
> > If I have abuttonwidget
>
> > w =Button(root, text = "Button", state = 'disabled')
>
> > How can I get the value of option 'state' from the widget 'w'.
> > I want something like --
>
> > print w.state  >> to print out >> 'disabled'
>
> > Thanks
> > Rahul
>
> print w["state"]
>
> James


Thanks! James




More information about the Python-list mailing list