Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Resize in Grid triggers header click
Message
 
 
À
06/12/2004 13:42:19
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00967240
Message ID:
00967280
Vues:
7
This message has been marked as the solution to the initial question of the thread.
>hhmmmmm.... Well Nadya, I'm not sure how to add a header class to a grid. I must subclass the header, add the properties, then add the header to the grid. How do I add the header to the grid??
>
>Thanks,
>Daniel

In the older VFP versions you can use:
********************************************************************
*  Description.......: AdjustGrid - replaces grid's headers with headers based on class
*  Calling Samples...: 
*  Parameter List....: 
*  Created by........: Nadya Nosonovsky 06/24/2002 09:22:36 AM 
*  Modified by.......: 
********************************************************************
for each oColumn in thisform.pgfMMR.Page1.grdViewResult.columns
	for each loObject in oColumn.controls
		if lower(loObject.class)="header"
			lcCaption=loObject.caption
			oColumn.removeobject("Header1")
			oColumn.newobject("Header1",'myHeader','myHeader.prg',"",m.lcCaption)
			with oColumn.Header1
			    .name="Header1"
			    .caption = m.lcCaption
			    .fontbold=.t.
			    .alignment=2
			    .lDontChangeOthers = .t.
			    .statusbartext = oColumn.comment
				.tooltiptext = oColumn.comment
				.cTagName = oColumn.tag
				.lNoActiveHighlight = .t.
			endwith
		endif
	next
next
Note, that you have to define your header class in the program.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform