Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I programatically add objects to a PageFrame?
Message
From
27/07/2000 19:42:00
 
 
To
27/07/2000 19:14:59
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00397937
Message ID:
00397944
Views:
36
Adding controls to PageFrame:

For example :
Add text box to PageFrame1.Page1

ThisForm.pageFrame1.Page1.AddObject("MyTextBox1","TextBox")
ThisForm.pageFrame1.Page1.MyTextBox1.Visible=.T.


Clearing one page is even more simple, and procedure can be used no mather which controls you add to page:

FOR lnn = 1 To ThisForm.PageFrame1.Page1.ControlCount
lcControlName = ThisForm.PageFrame1.Page1.Controls(lnn).Name
ThisForm.PageFrame1.Page1.RemoveObject(lcControlName)
ENDFOR
ThisForm.PageFrame1.Page1.Refresh()

But the real problem is how to add validation rules (code) to programatically added controls if You must validate user input. One possibile solution is to write Visual FoxPro interpreter under Visual FoxPro !
I think that the version 6.0 have some interpreter in sample code, I'm not 100% shure.

Sory for bad, bad English !
Previous
Reply
Map
View

Click here to load this message in the networking platform