CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2006
    Posts
    4

    Add TextBox at RunTime

    hi

    i have an Array of TextBox object. i want to add a new textbox to this array at run time.

    can i do it ?

    how do i do it ??

    thanx
    asaf

  2. #2
    Join Date
    Dec 2002
    Location
    London, UK
    Posts
    1,569

    Re: Add TextBox at RunTime

    Do you mean you have a control array on your form? if so then you use the load function to add controls to that form.
    Mike

  3. #3
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,772

    Re: Add TextBox at RunTime

    Quote Originally Posted by asaf123456
    hi

    i have an Array of TextBox object. i want to add a new textbox to this array at run time.

    how do i do it ??

    thanx
    asaf
    use something like
    Code:
    Load TextBox_A(TextBox_A.Ubound + 1)
    TextBox_A.Top = [Top Position]
    TextBox_A.Left = [Left Position]
    TextBox_A.Visible = True
    and to remove them use
    Code:
    Unload TextBox_A(TextBox_A.Ubound)
    Gremmy...
    Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
    WPF Articles : 3D Animation 1 , 2 , 3
    Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
    Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
    All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured