[Tutor] tkinter question
Abel Daniel
abli@freemail.hu
Tue Apr 8 10:09:01 2003
GREENDAY31087 wrote:
> I wanted to know if I can put text in a frame itself.
No. You need to put the text into a widget (a Label, for example), and
put that widget into the frame. (If you set the label's options right,
the widget itself wont be visible, so the text will look like being in
the frame. (I think the default options will do.))
> Also, can I change the color of a frame?
You can change the background color, by passing in an option when you
create the frame or by calling frame.config(), like this:
import Tkinter
frame=Tkinter.Frame(background='red')
frame.pack()
frame.config(bg='blue')
(bg is a synonim for background, they do the same.)
Abel Daniel