Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
_SCREEN.ActiveForm.Controls() ?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00103952
Message ID:
00104150
Views:
30
>I have a problem when I use _SCREEN.ActiveForm.Controls() when the control is in a pageframe. I can do lCtrl_is_Ro = _SCREEN.ActiveForm.Controls(nCtrl_no).ReadOnly or the like to get proberty values from a control, but _SCREEN.ActiveForm.Controls(nCtrl_no).Value = cNewValue to set proberty values in the control will return a "Controls is not an Object" error from Fox. Is there a way around this.
>
>Thanks,
>Mike K.
Mike,

You have a couple of problems. First you need to check _SCREEN.ActiveForm.Controls(nCrtl).BaseClass to see what the control is. If it is a pageframe then you need to work with

_SCREEN.Activeform.Controls(nCtrl).Page(nPage).Controls(nCtrl)

^ form ^ PageFrame ^ Page ^ control in page

As you can see this can get pretty hairy pretty fast. You might want to rethinnk your design here and find a more direct way to accomplish your goal.

Perhaps if you described your goal someone here might be able to show you a much easier way to achieve it.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform