Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Problem with grid and enabling/disabling field
I'm using a grid in a form that is populated from a cursor. One of the columns contains a spinner control that I want to enable or disable based on the value of a corresponding logical field in the cursor. To do this, I've put code into the grid's AfterRowColChange event - e.g. thisform.grid1.column1.spinner1.enabled = cursor.logical. This code is only triggered if the record # of the cursor changes (i.e. a row change, not a column change).
This works fine for disabling the spinner, however, it gets stuck in an odd way when it's time to enable the spinner. If the focus is on a disabled line of the cursor and you click on the spinner control of a line that should be enabled, the AfterRowColChange event does get triggered, and the spinner is set to being enabled, however it still behaves as if it is disabled. This only happens if you click directly onto the spinner from a disabled row. If you click on a different column in the new row to be enabled and then over to the spinner, it behaves fine. Also, if you clicked on the spinner initially, then click over to a different column in the same row, and then back to the spinner, it works fine. This is not, however, an acceptable way to require a user to interact with this.
There seems to be some link with the problem and the fact that the control is a spinner. I have used a regular field and it works fine. Needless to say, this problem has me stumped and I'd appreciate any helpful comments.
Thanks,
Rob
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement