-1

When I run this code to create a Listbox and change its appearance, I am given the error "'NoneType' object has no attribute 'configure'":

listbox = Listbox(myscreen).grid(row=1, column=0, sticky=NSEW, rowspan=2)
listbox.config(border=2, relief=SUNKEN)

`

Fibo36
  • 84
  • 4
  • 10

1 Answers1

0

Try configuring the listbox before placing it.

listbox = Listbox(myscreen)
listbox.config(border=2, relief=SUNKEN)
listbox.grid(row=1, column=0, sticky=NSEW, rowsoan=2)
13smith_oliver
  • 414
  • 6
  • 13