Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Binding Header.Click To Grid.ClickHeader
Message
From
19/05/2006 08:56:17
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
01123472
Message ID:
01123534
Views:
16
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform