Results 1 to 3 of 3

Thread: Runtime Control Arrays

  1. #1

    Thread Starter
    Junior Member dylanmendes's Avatar
    Join Date
    Dec 2001
    Location
    Bombay, India
    Posts
    28

    Runtime Control Arrays

    Hi again..
    Can arrays of controls be created at run-time. Sure you can create, say, a control-array of buttons at design-time... but is this possible dynamically?


    ------------------------------------------------------------------------------------
    Broaden that smile.. NOW!!!!!!!!!!!!!!!!!!

  2. #2
    Frenzied Member swatty's Avatar
    Join Date
    Aug 2002
    Location
    somewhere on earth
    Posts
    1,478
    Yes
    Code:
    If Question = Incomplete Then
       AnswerNextOne
    Else
       ReplyIfKnown
    End If
    cu Swatty

  3. #3
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724
    Create a control in design time, set it's index to 0 and in run-time:
    VB Code:
    1. 'To create a new control
    2. Load controlName(controlName.Count)
    3. controlName(controlName.Count - 1).Visible = True
    4.  
    5. 'And to remove a control
    6. Unload controlName(index)

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