Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid seems to loose track of what row it´s on (VFP6 /SP3)
Message
De
30/06/2000 09:47:11
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Grid seems to loose track of what row it´s on (VFP6 /SP3)
Divers
Thread ID:
00387036
Message ID:
00387036
Vues:
47
Let's assume a grid with 2 columns.
Column1's CurrentControl is a checkbox.
Column2's CurrentControl is a spinner.
The spinner should only be enabled if the checkbox is checked.

The code in the spinner GOTFOCUS method is:
THIS.ENABLED=THIS.PARENT.PARENT.COLUMN1.VALUE, i.e. .T. if the checkbox is checked, otherwise .F.

This works initially to some degree, but as soon as I click on a checkbox it stops working for all spinners in the grid, and no amount of refreshing or what have you will get it back on track.

I have had a similar problem once with calculations (Col3.Txt1.Value=Col2.Txt1.Value * .Col1.Txt1.Value) and solved id by
looping through the Columns and setting the CONTROLSOURCE property in the AFTEROWCOLCHANGE method.

LPARAMETERS nColIndex
FOR i=1 TO THIS.COLUMNCOUNT
THIS.COLUMNS(i).CONTROLSOURCE=THIS.COLUMNS(i).CONTROLSOURCE
ENDFOR

Regards

Peter
Peter Pirker


Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?

(Woody Allen)
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform