How to handle "New string added" event in ListBox?
-
Hi Everybody, I have a multi-column listbox. I need to change the width of the listbox, based on the string length. I've written the code in a function 'ResetLBWidth'. This function should get called whenever I add a string to the list box. How can I handle this? I don't find any event like "NewItemAdded".. Suggest me a path to achieve this. Thanks in advance, Sarvan AL
-
Hi Everybody, I have a multi-column listbox. I need to change the width of the listbox, based on the string length. I've written the code in a function 'ResetLBWidth'. This function should get called whenever I add a string to the list box. How can I handle this? I don't find any event like "NewItemAdded".. Suggest me a path to achieve this. Thanks in advance, Sarvan AL
There is no any event like "NewItemAdded" for listbox. If you are mannually filling the listbox then the whole control is in your hand. You can call the method ResetLBWidth where you are adding the data to listbox. If you have assigned some data source to the list box and your data source is changing then you have DataSourceChanged event to map.
-
Hi Everybody, I have a multi-column listbox. I need to change the width of the listbox, based on the string length. I've written the code in a function 'ResetLBWidth'. This function should get called whenever I add a string to the list box. How can I handle this? I don't find any event like "NewItemAdded".. Suggest me a path to achieve this. Thanks in advance, Sarvan AL
There is an event called TextChanged that rises whenever the text changes in the textbox. Meaning it will rises if u delete a character, add a character, replace a charachter ....... good luck