Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Active Cell in a grid
Message
De
08/04/2001 07:50:19
 
 
À
08/04/2001 03:59:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00493331
Message ID:
00493336
Vues:
12
Hi Alan.

>> When using a grid on a form, you can set the active colour of the cell, but as you move of the grid the colour change back to the inactive cell colour, is there any way of keeping the active colour on the last cell activated when not on the grid. <<

Add a property to your grid class called nRecNo and initialize it to 0.

This code in the grid's init:
*** Set up for highlighting current row
This.nRecNo = RECNO( This.RecordSource )
This.SetAll( 'DynamicForeColor', ;
	'IIF( RECNO( This.RecordSource ) = This.nRecNo, RGB( 0, 0, 128 ), RGB( 0, 0, 0 ) )', 'COLUMN' )
This.SetAll( 'DynamicBackColor', ;
	'IIF( RECNO( This.RecordSource ) = This.nRecNo, RGB( 0,255,255 ), RGB( 255, 255, 255 ) )', 'COLUMN' )
This in the grid's AfterRowColChange:
Thisform.LochScreen = .T.
WITH THIS
  .nRecoNo = RECNO( This.RecordSource )
  .Refresh()
ENDWITH
Thisform.LockScreen = .F.
Marcia
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform