update or refresh a Listbox widget

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Arne Meissner

    #1

    update or refresh a Listbox widget

    Hello!

    Is there a function to update/refresh a listbox widget.
    My one is connected to a database and after a change of the database I would
    like the listbox to be updated.

    Thank you for your help!
    Arne


  • Fredrik Lundh

    #2
    Re: update or refresh a Listbox widget

    Arne Meissner wrote:
    [color=blue]
    > Is there a function to update/refresh a listbox widget.
    > My one is connected to a database and after a change of the database I would
    > like the listbox to be updated.[/color]

    Tkinter?

    the quickest way is to do:

    w.delete(0, END)
    w.insert(0, *data)

    where w is the widget and data is a list (or other sequence) containing
    the new data.

    </F>



    Comment

    • Recoruds

      #3
      Re: update or refresh a Listbox widget

      it might be very slow when the data is big...

      Comment

      Working...