I've got a listbox. When I double click the listbox, I update the selected object and would like to udpate the displayed text for this object. For now I've got : ' Update goes here ' ... ' Nom I refresh the text of the selected item from the underlying object MyList.Text=MyUpdatedObject.ToString ' What should I do here so that the new text is shown in the listbox ? I tried to call Invalidate, Refresh etc... but it still shows the initial text.... How can I update the text for one of the line shown using an unbound listbox (I added my own objects using MyList.Items.Add(MyObject))... Thanks in advance...
Solved, what I found for now is : MyList.Items(MyList.SelectedIndex)=MyUpdatedObject Looks like reaffecting the updated object triggers the call to the ToString method and refreshes the list using this new text... -- Patrice "Patrice" <http://www.chez.com/scribe/> a écrit dans le message de groupe de discussion : 34146037-B63E-43E5-90AF-630963D33882@microsoft.com... > I've got a listbox. When I double click the listbox, I update the selected > object and would like to udpate the displayed text for this object. > > For now I've got : > > ' Update goes here > ' ... > > ' Nom I refresh the text of the selected item from the underlying object > MyList.Text=MyUpdatedObject.ToString > > ' What should I do here so that the new text is shown in the listbox ? > > I tried to call Invalidate, Refresh etc... but it still shows the initial > text.... > > How can I update the text for one of the line shown using an unbound > listbox (I added my own objects using MyList.Items.Add(MyObject))... > > Thanks in advance... > > >