Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Binding Header.Click To Grid.ClickHeader
Message
De
19/05/2006 08:56:17
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
01123472
Message ID:
01123534
Vues:
13
>Hi.
>
>I have a Grid class and my point is connect any click at header column to other method.
>
>Some information:
>

Why dont you use the MemberClass and MemberClassLibrary properties in your Grid class?

MemberClass = _Column
MemberClassLibrary = _GridMembers.prg

In _GridMembers.prg:
Define Class _Column As Column
	FontName = "Consolas"
	FontSize = 9
	HeaderClassLibrary = This.ClassLibrary
	HeaderClass = "_Header"
	Name = "_Column"
	nSortable = 1
        *!* cSortOrder: N = None, A = Ascending, D = Descending
	cSortOrder = [N]
	Width = 40
Enddefine

Define Class _Header As Header
	FontName = "Tahoma"
	FontSize = 8
	Name = "_Header"
	Procedure Click
	This.Parent.Parent.HeaderClick(This)
	Endproc
	Procedure MouseEnter
	Lparameters nButton, nShift, nXCoord, nYCoord
	If This.Parent.nSortable = 1 Then
		This.MousePointer = 7
	Else
		This.MousePointer = 1
	Endif
Enddefine
Add a HeaderClick procedure to your grid class. In that procedure you will get a reference to the header object, and you can do what you want there, using Parent.toHeader to access the Column.

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

Click here to load this message in the networking platform