Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding objects dynamically on form
Message
 
 
To
12/05/2004 03:18:21
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00902520
Message ID:
00903208
Views:
20
Erwin,

Have you stepped through this code in the debugger?

Also you need to change the evaluate() line to make it a character string. Assuming the code is in the form itself:
i = 1
scan
   with thisform.pageframe.page1
      lcObjName = "objectname" + padl( i, 3, '0' )
      .addobject( lcObjName,'classname')
      oNewobject = evaluate( "." + lcObjName )
      oNewobject.visible = .T.
      oNewobject.objcustomize(left, top, width, right, caption)
   endwith
endscan
>Within de form building code I use scan - endscan to loop through the list of questions that must be set upon the form. For each question I do follow
>
>with form.pageframe.page
> .addobject('objectname','classname')
> oNewobject = evaluate(form.pageframe.page.newobject)
> oNewobject.visible = .T.
> oNewobject.objcustomize(left, top, width, right, caption)
>endwith
>
>all works well except the objcustomize line. That seems to be skipped.
>
>I hope this gives you more info and you can help me out.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform