Hello,
I am developping a user management for a programm i am working on. My user manager offers the option to change the user information. In order to do that i am using a list box on left to select the user an some textfields on the right to display the user details of the selected user.
When changing detail information on the right and pressing the "save" button the changed information of the user are saved correctly in the object "user" (e.g changing the text in the textbox for the name and pressing save causes that in the "user" object the variable for the name change). Calling the modified "toString()" method of this object will return the changed name. But the item in my list box where this user is displayed havent changed the String.
I tried to call the method refreshText() of the list box but this hast no effekt. Object "behind" the item in the list hast been corectly changed. Just the representation in the listbox doesnt changed although calling the toString() method will return the changed name.
here the snippet:
// saving changes (this works fine)
user user = lb_users.SelectedItem // lb_user ist the list box displaying the user
user.name = this.txt_name.Text;
user.1stname = this.txt_vorname.Text;
user.winiID = this.txt_kennung.Text;
user.email = this.text_email.Text;
usermanager.saveUser(user); // uesermager is an object that holds all user and offers some funktion like
//saving user information to database - all works fine sofar
lb_user.refreshText(); // this doesnt cause the listbox to display changed information