Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Generic grid class
Message
De
20/07/2000 13:38:03
 
 
À
20/07/2000 13:00:50
Emerson Reed
Folhamatic Tecnologia Em Sistemas
Americana - São Paulo, Brésil
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00394948
Message ID:
00395011
Vues:
11
Sure.
You said you would like to use the Click() event. Be aware that the Click event will fire if the columns are rearranged or resized with the header.

Check out the DEFINE CLASS command in the help docs.
Here's an example, though.
** in PRG named "mycls.prg"
DEFINE CLASS myheader AS header

 PROCEDURE Click()
   * e.g., make this header bold and the rest not bold
   this.parent.parent.SetAll("FontBold", .F., "myheader")
   this.FontBold = .T.
 ENDPROC

ENDDEF
In your code to the create the grid:
SET PROCEDURE TO mycls.prg ADDITIVE
this.oGrid.ColumnCount = 2
FOR EACH loCol In this.oGrid
  loCol.RemoveObject("Header1") && default name of the header
  loCol.AddObject("MyHeader1", "myheader")
ENDFOR
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform