Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid classes and Header method code
Message
De
01/12/1999 09:52:56
 
 
À
01/12/1999 07:50:19
Sam Trenchard
System Support Services
London, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00297240
Message ID:
00297289
Vues:
26
Hi Sam.

>> I wish to create a grid class with methods for setting the index order of data to the column header clicked. I have created the custome method to detect whether an index exists for the control source but cannot see how to place method code in the Column header click event of the class to be inherited by the instance of the grid on the form. <<

You can create a custom header, but yo have to do it in code. You can't do it visually. Something like:
DEFINE CLASS HdrBase AS Header
  FUNCTION Click
  WITH This
    IF PEMSTATUS( .Parent.Parent, 'SetOrder', 5 )
      .Parent.Parent.SetOrder( JUSTEXT( .Parent.ControlSource ) )
    ENDIF
  ENDWITH		
  ENDFUNC
ENDDEFINE
You then can write a little builder to replace vfp's base class headers with your custom headers at design time.

Marcia
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform