haroldjclements Posted July 16, 2004 Posted July 16, 2004 Hello All, I have created an application that reads items from a database. What I want to do now is create an array of text boxes that are populated with the data retrieved from the database. The problem is that I am unsure how to create an array of textboxes at runtime. I can use the .set_Size() method to place the box. So far I have: System.Windows.Forms.TextBox [] tbxResults = new TextBox[20]; while (myDataReader.Read()) { tbxResults[loopControl] = new TextBox(); tbxResults[loopControl].set_Location(new System.Drawing.Point(8, y)); tbxResults[loopControl].set_Visible(true); loopControl ++; y += 24; } However the does not work. Any help will be most appreciated Harold Clements Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.