[Tkinter-discuss] TkInter LabelEntry

PatT strudwickthomas at yahoo.com
Fri Aug 24 06:10:18 CEST 2007

When I run the code below, the data is the second entry box is invisible
because the Entry widget is disabled. How can I see the data, but keep the
disabled attribute?

from Tix import *

root = Tk()

frame = Frame(root)

labent1 = LabelEntry(frame, label="A",
                     labelside = 'left',
                     options = '''
                     entry.width 40
labent1.entry['background'] = 'gray90'
labent1.entry.insert('end', "AAA")
labent1['state'] = 'normal'
labent1.grid(column=0, sticky=E)

labent2 = LabelEntry(frame, label="B",
                     labelside = 'left',
                     disabledforeground = 'red',
                     options = 'entry.width 40')
labent2.entry['background'] = 'gray90'
labent2['state'] = 'disabled'
labent2.entry.insert('end', "BBB")
labent2.grid(column=0, sticky=E)


View this message in context: http://www.nabble.com/TkInter-LabelEntry-tf4321384.html#a12306089
Sent from the Python - tkinter-discuss mailing list archive at Nabble.com.

More information about the Tkinter-discuss mailing list