Dynamicaly add controls

How do I control the location of Dynamicaly add controls?  
LVL 1
HLRosenbergerAsked:
Who is Participating?
 
Mike TomlinsonConnect With a Mentor Middle School Assistant TeacherCommented:
Set the Location() property?...

    Dim btn As New Button
    bnt.Location = New Point(x, y)
0
 
HLRosenbergerAuthor Commented:
I've read about setting the location that property in other article.

I'm doing:

dim lbl as New Label

And my lbl does not have a location property.  I don't get it..
0
 
Mike TomlinsonConnect With a Mentor Middle School Assistant TeacherCommented:
Label certainly does have a Location() property.  =)

Can you show us  more code?
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
HLRosenbergerAuthor Commented:
I believe you.  I just do not know what's going on.  I tried a button, and textbox, and neither have location property.

here's my actual code:

Dim lbl As New Label
lbl.Text ="This is a label"
lbl.Visible = True
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
What kind of project did you start with?

Where is this code being placed?
0
 
Jacques Bourgeois (James Burger)Connect With a Mentor PresidentCommented:
If you do not have a Location property, you are probably working on a Web application. You should note so and your question, and add ASP.NET in your zones selection.
0
 
HLRosenbergerAuthor Commented:
Yes, this is WEB application
0
 
HLRosenbergerAuthor Commented:
Thanks
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Lol...that would explain it.  Good call JamesBurger!
0
All Courses

From novice to tech pro — start learning today.