Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 6.0 - Addobject Method
Message
 
To
02/03/1999 11:22:26
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00193175
Message ID:
00193189
Views:
15
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
Map
View

Click here to load this message in the networking platform