Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing Rows in Grid
Message
De
07/01/2002 16:12:43
 
 
À
07/01/2002 15:42:17
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00601625
Message ID:
00601646
Vues:
35
Marcia,

Thanks for the clarification....As usual I sometimes can't see the forest for the trees and make things more difficult than they really are !!

Many thanks,
Greg


>Hello Greg.
>
>Unless I'm completely misunderstanding how the BeforeRowColChange and AfterRowColChange events work, I don't understand why the following doesn't work, ie. highlight the current row in a grid.
>
>Actually, I think that you are misunderstanding they way that these events fire as well as how DynamicBackColor works < s >
>
>*nORecNo and nNRecNo are custom properties
>
>*BeforeRowColChange
>thisform.nORecNo=RECNO()
>
>*AfterRowColChange
>thisform.nNRecNo = RECNO()
>thisform.grdSearch.SetAll("DynamicBackColor","iifthisform.nnrecno=thisform.norecno)," + ;
> allt(str(RGB(0,255,0)))+ "," + allt(str(RGB(255,255,255))) + ")")

>
>The condition Thisform.nnRecNo = ThisForm.noRecNo will never evalutate to true. In the grid's BRCC, the record pointer is on RECNO( n ). In the grid's ARCC, the record pointer has moved and is now on RECNO( n + 1 ). If you want to highlight the current row in the grid, this code in the grid's init
>
>
>*** Set up for highlighting current row
>This.nnRecNo = RECNO( This.RecordSource )
>This.SetAll( 'DynamicBackColor', ;
>	'IIF( RECNO( This.RecordSource ) = This.nnRecNo, RGB( 0,255,255 ), RGB( 255, 255, 255 ) )', 'COLUMN' )
>
>
>Then, in the Grid's ARCC:
>
>
>Thisform.LockScreen = .T.
>This.nnRecNo = RECNO( This.RecordSource )
>This.Refresh()
>Thisform.LockScreen = .F.
>
>
>You only have to set the DynamicBackColor property once (i.e., in the grid's init). It is evaluated every time the grid is refreshed.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform