Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting a grid to read-only
Message
De
02/03/1998 19:58:19
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00080620
Message ID:
00082197
Vues:
33
>>>>>How can I (in a simple way) make the grid "read-only". I have tried setting grid.enable = .F. which is great, but also disables the scroll bars. Before I bark up the wrong tree is there a better way to do this?
>>>>>
>>>>>Note: what I want is to still allow the user to scroll through data values, but not be able to change data in text boxes and combo boxes in the grid until they enter edit mode (click an edit button or something). Clear as mud? :-)
>>>>
>>>>Use readonly property, e.g. Grid.Readonly=.t. Sometimes you'll have to set specifically Grid.Column1.Readonly=.t. (especially if you add new columns). Also, it's nice to set SET NOTIFY OFF to remove annoying message "record is read only"
>>>
>>>Ed, Bela:
>>>
>>>The user can still select the combo boxes in the grid and this will cause events to fire. Any other ideas?
>>
>>Its a pain but you can use a brute force method of setting the all the combos and txtBoxes except one to Enabled = .F. and then when the edit button is pressed turn them back on. I know this is a pain though.
>
>Why would I leave one enabled? Why not disable all of the controls?

Leaving one enabled allows them to select the record they want to edit.
I have a program that lists all the computer maintenance requests in a grid. The user selects one from the number field (the only one not disabled). The record is then expanded using a right click menu to allow edits/adds etc.
It is impossible to make programs idiot proof. Idiots are too cleaver.

MCP( Tcp/Ip )
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform