Well, obvoiusly you are no putting all of the text boxes in the same position
(top,left = 10) You just give the textbox a different name. If you want it to be a no brainer, do this:
thisform.addobject("mytextbox_")+ALLTRIM(STR(thisform.controlcount +1)),"textbox")
WITH thisform.controls(thisform.controlcount)
.Top = 10
.Left = 10
.Visible =.T.
ENDWITH
Why aren't you using the form designer????
>I don't know how many text boxes I will need in my form...any other suggestions?
>
>
>
>>>If I run the following code twice I get an error message [A member object with this name already exists]. What do I do if I want to create more than one textbox on my form?
>>>
>>>Thank you for your time
>>>
>>>
>>>THISFORM.AddObject('mytextbox','textbox')
>>>THISFORM.mytextbox.Top = 10
>>>THISFORM.mytextbox.Left = 10
>>>THISFORM.mytextbox.Visible =.T.
>>You need to give mytextbox a different name for each textbox.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only