Hi Borislav,
Thanks for teach me... specially when you said
"There is almost nothing inpossible in Visual FoxPro :o)"Hi Carlos,
I did it using MemberClass before try to use BindEvent(). Now, that I have two ways, I will study the best option to use in my new framework. Thanks for answer!
>>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
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Rodolfo Duarte