[Tutor] Tkinter
Olavi Ivask
olavi at city.ee
Thu Apr 29 16:14:12 EDT 2004
David Rock wrote:
>* olavi at city.ee <olavi at city.ee> [2004-04-29 19:44]:
>
>
>>Hi everybody!
>>
>>Can anybody tell, what is the difference between
>>
>> label = Label(root, text="Label1").grid()
>>
>>and
>>
>> label = Label(root, text="Label1")
>> label.grid()
>>
>>Which method is better to use?
>>
>>
>
>label = Label(root, text="Label1").grid()
>
>assigns the grid object to the variable label, while
>
>label = Label(root, text="Label1")
>
>assigns the LABEL object to label. The second one is probably better
>because you are working with the primary object that you can call ALL
>methods for, not just grid(), while the first is limited to JUST grid()
>
>
can i do something like that:
I "define" several widgets:
label = Label(root, text="text")
label = Label(root, text="text2")
...
label.grid()
right now, it shows only second widget.
Olavi
>------------------------------------------------------------------------
>
>_______________________________________________
>Tutor maillist - Tutor at python.org
>http://mail.python.org/mailman/listinfo/tutor
>
>
More information about the Tutor
mailing list