Thursday 15 September 2011

tkinter - How to change the attributes for all objects inside a list in python(3)? -


I am Python and stranger to manipulate python lists. I have a list of tabular widgets, more specifically the buttons, which are being used in my catalog btnList :

btnList.append (btn1) < / Code>

btnList.append (btn2)

Typically its use to change the attribute value of the object (for example state attribute) Will be:

btn1.configure (state = 'disabled')

btn2.configure (state = 'disabled')

which will set the state attribute of both buttons to disable,

what list Switch to present a way to change the properties of all objects? For example, is the status of each button set to disable?

Just loop in your list: written: button. Configure (state = 'disabled')

No comments:

Post a Comment