Creating textboxes during program execution
Quote:
> Hi!
> I'm trying to create a textbox in a method. I'm using VFP 3.0.
> TextBox NAME Txtbox1 -- but I can't access any of it's properties
> (thisform.txtbox1.value returns nothing) and I can't click into it on
> the form.
Check the 'Addobject' method.
WITH thisform
.Addobject('MyName', 'TextBox')
WITH .MyName
.Top = 10
.Left = 20
...
* Other properties assigned here
...
.Visible = .T.
ENDWITH
ENDWITH
Quote:
> Is there any way to do this? Also, is there any way to get a list of
> active objects? I tried AINSTANCE(aArray, "TextBox") but it returns 0.
Try:
WITH thisform
FOR nControl = 1 TO .ControlCount
? .Controls(nControl).name
ENDFOR
ENDWITH
This will print a list of all controls added to the project (not just
text boxes). Strictly speaking the active object is the object that
currently has focus of which there can be only one.
Quote:
> Thanks!
> --
> Jeff Davidson
> Los Angeles, CA