Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Control collection

Control collection

Scheduled Pinned Locked Moved C#
question
3 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    magnifique
    wrote on last edited by
    #1

    hi friends how can i get a collection of the names if textboxes on a panel control please i need practical examples

    R 1 Reply Last reply
    0
    • M magnifique

      hi friends how can i get a collection of the names if textboxes on a panel control please i need practical examples

      R Offline
      R Offline
      Roger Stewart
      wrote on last edited by
      #2
      ArrayList names = new ArrayList();
      
      foreach(Control ctrl in myPanel.Controls)
      {
         if(ctrl is Textbox)
         {
            names.Add(ctrl.Name);
         }
      }
      

      Roger Stewart "I Owe, I Owe, it's off to work I go..."

      M 1 Reply Last reply
      0
      • R Roger Stewart
        ArrayList names = new ArrayList();
        
        foreach(Control ctrl in myPanel.Controls)
        {
           if(ctrl is Textbox)
           {
              names.Add(ctrl.Name);
           }
        }
        

        Roger Stewart "I Owe, I Owe, it's off to work I go..."

        M Offline
        M Offline
        magnifique
        wrote on last edited by
        #3

        thanks for your reply i think i need to know a lot about u my approach was about 4 lines of code but your reply has help me understand. i'm from ghana and working as a programmer with the softtribe

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups