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 <j...@wheypower.com> wrote: >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 TO 4 > FOR j = 1 TO 10 > oTextbox = CreateOBJECT("TextBox") > WITH oTextbox > .Name = "TextBox" + LTRIM(STR(i)) + LTRIM(STR(j)) > .Left = (j - 1) * 10 > .Top = (i - 1) * 20 > .Width = 100 > .Height = 20 > .Value = "Data for cell " + LTRIM(STR(i)) + ", " + LTRIM(STR(j)) > .Visible = .t. > * .Parent = thisform > ENDWITH > ENDFOR >ENDFOR > >What am I missing? >Thanks in advance, > >Joe > > >--- StripMime Report -- processed MIME parts --- >multipart/alternative > text/plain (text body -- kept) > text/html >--- > [excessive quoting removed by server] _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/44bd27a7-797d-4d3e-8d81-cf2acab82...@powerchurch.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.