Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Customized Header in Grid
Message
De
11/01/2010 13:46:45
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
11/01/2010 12:01:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01443157
Message ID:
01443297
Vues:
38
>>IMO, the easiest (and what I have in code somewhere)
>>
>>save the caption and whatnot from the old header
>>add the new header
>>apply the saved properties
>>bindevent to the new header any behavior you need.
>
>After reading your comment I did this:
>
>Create newheader.prg:
>
DEFINE CLASS MyHeader AS Header
>
>   Caption = "Header"
>   FontName = "Wingdings"
>   FontSize = 8
>   
>   * put whatever behavior
>
>ENDDEFINE
>
>Create a form, add a table and drop that table on the form, thus creating a grid. Then enter the grid's Init method and add this:
>
set proc to newheader.prg
>
>this.column1.addobject( 'header2', 'myheader' )
>
>Then CTRL+E. And indeed the first column displays very nicely the caption in wingdings. This all in VFP7 indeed.
>
>The funny thing is that its reference is now Header2, but that Header1 no longer exists indeed, as this code proofs. The first line creates an error.

Try to give it any other name, including (maybe) Header1, and it should work with whatever name you give it. Because the moment you add the new one, the old one is destroyed.

>
wait wind this.column1.header1.caption
>wait wind this.column1.header2.caption
>
>Your words "because a column must, at any time, have one and only one column" should be "because a column can at any time have one and only one header".

Lapsus capitis...

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform