Results 1 to 3 of 3

Thread: Fill Combobox with List of Control names

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2007
    Posts
    77

    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

  2. #2
    Frenzied Member
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,158

    Re: Fill Combobox with List of Control names

    you can use Control.Name directly, no need of any conversion

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Feb 2007
    Posts
    77

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width