Control Array at run time 
Author Message
 Control Array at run time

Dear Friends,
my problem about control array,
I want to make control array for textbox at run time.
At design time the form  must have just one commandbutton
and one textbox.
 The scenario is that every time the user click the
commandbutton,
the textbox increase by one in a straight line towards
the bottom of the form,
once the textbox reach the bottom of the form, the form's
height stretch with every
textbox added, once the form reach to the end of screen
the stretch of the height stopped,
and the next textbox wil be add on the left of the first
text box, then make another straight line
of textbox beside the first one and so on tell
textboxes's colomns reach to the end right of the form,
then the width of form stretch from the right side to
reach the end right of the screen.
following a sample of the code i wrote but failed to
complete it:

Private Sub Command1_Click()
Static x As Integer
    x = x + 1
    Load Text1(x)

    If x <= 3 Then
    Text1(x).Top = Text1(x).Top + Text1(x - 1).Top + 500
    Text1(x).Visible = True

    Else

    Text1(x).Top = Text1(x).Top + Text1(x - 1).Top + 500
    Text1(x).Visible = True
    Me.Height = Me.Height + Text1(0).Height + 700

End If

End Sub

Thanx so much in advance  
Soly



Sun, 11 Jul 2004 06:06:22 GMT  
 Control Array at run time
You're essentially on the right track.  Are you asking a
question, or just want me to complete your work for you?


Sun, 11 Jul 2004 23:36:37 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Creating controls in a control array at run-time

2. create & add controls array in run time

3. control arrays at run time

4. Control Array at Run-Time

5. Creating Control Arrays At Run Time

6. Creating control arrays at run time?

7. Control Array at Run Time, Bring to Front

8. VB6 - Creating Control Array at Run Time

9. create a control array at run time

10. Control Array at Run Time, Bring to Front

11. Creating control arrays at run-time - is this possible?

12. Invalid control array index -- Run-Time error '341'

 

 
Powered by phpBB® Forum Software