how to update a wxlistbox from a different class?
i have a wxlistbox in a class and i want to update the data inside the listbox from a different class.Is i possible to reload the class while leave the control from another class?if yes ,how?
eg: i have two classes,Class A and Class B.In class A there is a wxlistbox.while starting the program class A initilise the wxlistbox and bind some values.when a button inside class A clicked it 开发者_JS百科call another frame class B.while close the frame B the wxlistbox inside class A should update. My question is how to refresh listbox while close the frame B?
I would use the SetItems() method, which according to the docs does the following: "Clear and set the strings in the control from a list".
Edit: myListCtrl.SetItems(ListOfStrings)
That will replace all the items in the control with whatever is in the list.
精彩评论