Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Positioning Dynamically added controls

Thread Tools

Positioning Dynamically added controls

Posts: n/a

I am adding a textbox control at runtime that allows a user to enter a date.
I also want to add a calendar icon beside the textbox so that the user can
click on the calendar icon and have it populate the textbox if they choose.
(We all have seen this in sites such as expedia or something like that).

I have a placeholder that will hold the textbox and I want to add the
calendar to the SAME placeholder. I am able to add it to the same
placeholder but it adds it below the textbox. Instead, I want to position
the calendar beside (to the right) of the textbox.

Here is what I have so far in VB.NET

dim tb as new textbox
dim ctl2 as new control()
Form1.Controls.Item(k).Controls.AddAt(0, tb)

Form1.Controls.Item(k).Controls.AddAt(1, ctl2)

Anyone know of how i can position the second control beside the first?



Reply With Quote
Natty Gur
Posts: n/a

try to use DIV.

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture

*** Sent via Developersdex ***
Don't just participate in USENET...get rewarded for it!
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
positioning dynamically created controls Smokey Grindel ASP .Net 2 10-04-2006 03:52 PM
Data and controls from dynamically added controls is rmoved on Submit David Hubbard ASP .Net 2 01-17-2006 06:52 PM
Inserting Controls Dynamically - with Validators Also Added Dynamically Jeffrey Todd ASP .Net 1 06-02-2005 04:33 PM
existing controls overlaying dynamically added controls ENathan ASP .Net Web Controls 2 01-10-2005 10:34 PM
Positioning dynamically created controls Guy ASP .Net Web Controls 2 12-23-2004 10:53 AM