Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Header method
Message
De
14/01/2004 08:46:27
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
14/01/2004 08:24:59
Daniel Antich
Informática Industrial
Heredia, Costa Rica
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00866647
Message ID:
00866700
Vues:
17
Daniel,
there is an other way but this is the hard one. (To me I woud think to by VFP 8.0 is cheaper and I would recommend for better stability).

Lets see if I can describe my way:
There is no way to change te code of an running object. All what you can do is to use a differnt object.

1. Step
create a new HEADER object. This need to be a prg based class. Add the code needed:
*File MyClass.prg
DEFINE CLASS MyHeader AS HEADER
 CAPTION = "MyHeader"

 PROCEDURE Click
 WAIT 'Clicked'
*or call a handler on the grid and tell the handler the column
*!* this.parent.parent.HeaderClicked(this.parent)
 ENDPROC &&MyHeader.Click
 ENDDEFINE &&MyHeader
2.Step replace the original HEADER with your header like:
with myForm.myGrid.Colum1
.NEWOBJECT('Header2',"MyHeader","MyClass.prg")
*Move the properties needed from old to new header:
.Header2.Caption = .Header1.Caption
.Header2.FONTBOLD = .Header1.FONTBOLD
*and so on

*remove old header
.REMOVEOBJECT('Header1')
*rename new header
.Header2.name = 'Header1'
* now we have a new header Header1!
wait .header1.class
endwith
this is tested, I have done it a lot of times to implement sorting.
HTH
Agnes
>Thanks Agnes, but I have VFP 7.0. You know another technique for this version.
>-Daniel

Th
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform