Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Making Fields Read only
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Making Fields Read only
Divers
Thread ID:
00634031
Message ID:
00634031
Vues:
42
Hi.
I have a form with 3 pages, Page 1 = Grid and various fields in pages 2 and 3

I am trying to conditionally prevent access to fields if the grid record is set to Posted. In other words, If the record has been posted, dont allow any fields to be amended, else allow fields to be amended.

I have set up a loop to set the fields to read only e.g.
For LnFor = 1 to ThisForm.pgfPageFrame1.page2.ControlCount
If Pemstatus(ThisForm.pgfPageFrame1.page2.Controls(lnFor),"Readonly", 5)
ThisForm.pgfPageFrame1.page2.Controls(lnFor).Readonly = .T.
Endif
Endfor

This works up to a point:
1) Combo boxes are not flagged as read only
2) When I hit a record that has NOT been posted, I will probably have to run through a loop to flag all fields as readable again (except that I have some fields that will always be read only)

I'm just wondering is there another/better way of doing this ?

Regards,

Gerard
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform