How to transfer selected items on ListBox control

Dear sir,

I,m beginer for wxpython program.
I want to transfer from selected items on right ListBox to left ListBox as attached simple picture.

Please inform me how to solve this problem.

Best regards,

J.K.Lee

aa.jpg

??? wrote:

Dear sir,

I,m beginer for wxpython program.
I want to transfer from selected items on right ListBox to left ListBox as attached simple picture.

Please inform me how to solve this problem.

In the event handler for the top button get the list of item indexes that are selected in the first listbox with GetSelections. For each index get the matching string from the listbox with GetString, and Append it to the second listbox. If you want to also remove it from the first listbox then you can do that with Delete. Or you may want to ensure that an item is not already in the destination listbox...

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!