RE: How to force a Pmw ComboBox to update list

Discussion in 'Python' started by mark, Aug 28, 2003.

  1. mark

    mark Guest

    Ahh, something I can answer authoritatively (because I do it all the
    time)!

    Here's what you want:

    ComboBoxName._list.setlist(list)

    Now, if I understand this method correctly, (list) has to be a tuple.
    Let me know if this isn't the case, but it seems like I'm doing some
    convoluted things (like converting lists to tuples) to make this work
    correctly.

    You didn't mention whether or not you use dropdowns. I am using them,
    and this is how I update them. If you don't, this may not work for you.

    HTH,

    Mark
    -----Original Message-----
    From: [mailto:p]
    On Behalf Of Marc
    Sent: Wednesday, August 27, 2003 4:19 PM
    To:
    Subject: How to force a Pmw ComboBox to update list

    Hi all,

    I have an application that uses a Pmw ComboBox to display a list that
    is dynamic. The user has the ability to add and delete items from the
    list at different points in the program.

    However, once the list is updated it needs to automatically refresh
    the ComboBox to reflect the updated list. The only way I have been
    able to solve the problem so far is to redraw the window (by
    withdrawing the window and calling the function that creates the
    window again). I tried to do a 'configure' on the ComboBox, but
    couldn't get it to work because the list itself was an initialization
    even. However, I could have been doing that wrong.

    Is there any way to force the ComboBox to update the list or redraw
    itself with the new list?

    Thanks ahead of time,
    Marc
    --
    http://mail.python.org/mailman/listinfo/python-list
     
    mark, Aug 28, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marc
    Replies:
    0
    Views:
    391
  2. Camilo Olarte

    Q: How to Change Pmw.ComboBox width ??

    Camilo Olarte, Sep 26, 2003, in forum: Python
    Replies:
    0
    Views:
    422
    Camilo Olarte
    Sep 26, 2003
  3. Martin Franklin

    Re: Q: How to Change Pmw.ComboBox width ??

    Martin Franklin, Sep 26, 2003, in forum: Python
    Replies:
    0
    Views:
    1,369
    Martin Franklin
    Sep 26, 2003
  4. Gombos Katalin

    Pmw.ComboBox

    Gombos Katalin, Oct 20, 2003, in forum: Python
    Replies:
    1
    Views:
    590
    Eric Brunel
    Oct 20, 2003
  5. Gombos Katalin

    Pmw.ComboBox

    Gombos Katalin, Dec 10, 2003, in forum: Python
    Replies:
    0
    Views:
    381
    Gombos Katalin
    Dec 10, 2003
Loading...

Share This Page