-
Hello!
I'm using an array of Rixhtextboxes, called Text(i), where i = 1,2,3 etc.
When I load the form it only contents one textbox, Text(1). I want the user to be able to (by clicking a button) create a new textbox in the series, Text(2). Then, choose to either create Text(3) or delete Text(2), etc.
Is there a way to do this?
I've thought of creating a lot of textboxes, say Text(1-100), and making them visible or invisible instead of creating, deleting, but it would be rather inconvinent.
So please, if you know how to do it, Help Me!!!
Cheers,
Pentax
-
here you go
Code:
Private Sub Command1_Click()
Dim maxID As Integer
maxID = rtf.Count
Load rtf(maxID)
rtf(maxID).Visible = True
rtf(maxID).Top = rtf(maxID - 1).Top + rtf(maxID - 1).Height
End Sub
did this help?
-
and to unload a control array element
-
Well, it helped half way
I can create textboxes allright, but I can't get them visible.
I use them together with a TabStrip, so when you click on a tab I run a For series from i = 1 to [the amount of text-boxes, also the amount of tabs] stating that
If i = TabStrip1.SelectedItem.Index Then
Text(i).Visible = True
Else:
Text(i).Visible = False
End If
It doesn't work! Or rather, it works with Text(1), which hides when I click another tab end reappears when I click tab nr. one, but the new created textboxes doesn't show.
It's not that they have wrong coordinates, I've checked and they are well inside the form.
What can be wrong?
I'm getting desperate...
Pentax