Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
_SCREEN.ActiveForm.Controls() ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00103952
Message ID:
00104150
Vues:
29
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform