Positioning Dynamically added controls

Discussion in 'ASP .Net' started by Harry, Jun 25, 2003.

  1. Harry

    Harry Guest

    Hi

    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?

    Thanks

    Harry
     
    Harry, Jun 25, 2003
    #1
    1. Advertising

  2. Harry

    Natty Gur Guest

    Hi,

    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 http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Natty Gur, Jun 25, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeffrey Todd
    Replies:
    1
    Views:
    4,151
    Peter Blum
    Jun 2, 2005
  2. David Hubbard
    Replies:
    2
    Views:
    640
    David Hubbard
    Jan 17, 2006
  3. Smokey Grindel

    positioning dynamically created controls

    Smokey Grindel, Oct 4, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    525
    Smokey Grindel
    Oct 4, 2006
  4. Guy

    Positioning dynamically created controls

    Guy, Dec 22, 2004, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    240
    Mohamed El Ashmawy
    Dec 23, 2004
  5. ENathan

    existing controls overlaying dynamically added controls

    ENathan, Jan 10, 2005, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    211
    Steve C. Orr [MVP, MCSD]
    Jan 10, 2005
Loading...

Share This Page