Fill Combobox with List of Control names
Hi,
I have a WinForms applciation, I wrote a function that returns a list of all the controls on the form. The function returns a list of control objects.
My target is to fill up a combo box with a list of the control names so that once clicked I set focus to it.
So what is the correct code for converting a List(Of Control) to an array of string.
Thanks
Re: Fill Combobox with List of Control names
you can use Control.Name directly, no need of any conversion
Re: Fill Combobox with List of Control names
well, I won'd be able to access the name property unless I iterate through the List (Of Control). I was assuming there was a quicker way using one line of code. I will iterate then.
Thanks anyway