I know the DataBinding of Controls, but afaik can you only bind one
property with another.
I hope you can help me!
Thanks,
Michael
In order to do this you can add the actual object of the ArrayList, not the
string. Then when the item changes, the ArrayList will reflect the changes.
But, in order to do this, you must inherit the ArrayList class and write
your own class which provides methods for ToString (), because this is what
the listbox will query to get the string to display in the listbox. Include
any other override functions as needed.
--
Hope this Helps.
Ryan Dawson
"Michael Dengler" <ma...@dengl.com> wrote in message
news:3D88EC0...@dengl.com...
Thank you for your answer Ryan!
But you haven't completely understood my question (perhaps of my
"german" English :-) )
I don't add strings to the listbox, but objects of my own class with an
overridden ToString() function. So the listbox contains references to
the arraylist. If I remove or add an object in the listbox, the object
in the arraylist will be added or removed as well, that's not my problem.
But in order to provide that the listbox contains the same items as the
arraylist every moment, I have to call a function which fills the
arraylist when I for example change the property, used by the ToString()
method.
I need an arraylist, which is automatically updated when I change the
objects.
Thanks,
Michael
I am not sure if there is an elegant solution to your problem. You may
repost your question.
--
Hope this Helps.
Ryan Dawson
"Michael Dengler" <ma...@dengl.com> wrote in message
news:3D89A495...@dengl.com...