Re: Changing the Image on a button

2009-02-20 Thread odeits
On Feb 17, 7:14 am, John Posner wrote: >  >> > Try this change: >  >> > >  >> >   from: btn.configure(image = None) >  >> >     to: img1.blank() >  >> > >  >> >  >> This does in fact clear the image out, however it isn't causing the >  >> text to display... Do i have have to create a new button an

RE: Changing the Image on a button

2009-02-17 Thread John Posner
>> > Try this change: >> > >> >   from: btn.configure(image = None) >> >     to: img1.blank() >> > >> >> This does in fact clear the image out, however it isn't causing the >> text to display... Do i have have to create a new button and swap it >> out? I knew you were gonna ask that! :-)

Re: Changing the Image on a button

2009-02-16 Thread odeits
On Feb 16, 8:40 am, John Posner wrote: >  >> from Tkinter import * >  >> >  >> def do(): >  >>     btn.configure(image = None) >  >> >  >> root = Tk() >  >> img1 = PhotoImage(file="bacon.gif") >  >> >  >> btn = Button(image = img1, command = do, text = "hello" ) >  >> btn.img = img1 >  >> btn.pack

RE: Changing the Image on a button

2009-02-16 Thread John Posner
>> from Tkinter import * >> >> def do(): >> btn.configure(image = None) >> >> root = Tk() >> img1 = PhotoImage(file="bacon.gif") >> >> btn = Button(image = img1, command = do, text = "hello" ) >> btn.img = img1 >> btn.pack() >> root.mainloop() >> Try this change: from: btn.