I’ve looked all over and can find nothing. The only solution I’ve found is to manually call the function when you add an item, but that’s inefficient, and I know it’s possible.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Wrap the logic in a separate class. That way you’re only calling the one piece of code but you can also know when items are added.
There is no event for this that is native to the .NET listbox control. The only other option is subclassing the listbox and listening manually.