RE: Programatically placing text boxes on a form - continued

2023-10-30 Thread juergen
This one even provides a working version :=) *** nStartRow = 10 nStartCol = 10 For nCol = 1 To 4 For nRow = 1 To 10 cTextBoxName = "TextBox" + Trans(nCol) + Trans(nRow) Thisform.AddObject( cTextBoxName, "textbox") With Thisform.&cTextBoxName .L

Re: Programatically placing text boxes on a form - continued

2023-10-30 Thread Frank Cazabon
Try this: FOR i = 1 TO 4     FOR j = 1 TO 10    m.lcTextBoxName = "TextBox" + LTRIM(STR(i)) + LTRIM(STR(j))    THISFORM.ADDOBJECT( m.lcTextBoxName, "textbox")    oTextbox = EVALUATE( "Thisform." + m.lcTextBoxName)    WITH oTextbox        .NAME = "TextBox" + LTRIM(STR(i))

Programatically placing text boxes on a form - continued

2023-10-30 Thread Joe Yoder
Tracy, Thanks for the help - the first line makessence and executes just fine but the "oTextbox = evaluate" line errors with variable "TEXTBOX11" is not found. Do I need something in my code or on my form to have this work properly? BTW - sorry for not doing this as a reply. My email no longer ge

Re: Programatically placing text boxes on a form

2023-10-30 Thread Eric Selje
Along these lines, if you haven't checked out the Dynamic Forms project on VFPx, that makes programmatically creating forms MUCH easier. E On Mon, Oct 30, 2023 at 5:19 AM Tracy Pearson wrote: > The textbox needs to be added with a method on the form.

Re: Programatically placing text boxes on a form

2023-10-30 Thread Tracy Pearson
The textbox needs to be added with a method on the form. thisform.addobject( "TextBox" + LTRIM(STR(i)) + LTRIM(STR(j)), "textbox") oTextbox = evaluate( "TextBox" + LTRIM(STR(i)) + LTRIM(STR(j))) HTH, Tracy On October 29, 2023 11:43:13 PM EDT, Joe Yoder wrote: >I know I had code years

Programatically placing text boxes on a form

2023-10-29 Thread Joe Yoder
I know I had code years ago that did this but it apparently got mangled during computer transitions. The code below runs in the load event of a form but results in a blank form. The ,"parent = thisform line" is commented out because it causes a "Property PARENT is read-only" error.. FOR i = 1 T