Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Binding Header.Click To Grid.ClickHeader
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
01123472
Message ID:
01123491
Views:
18
This message has been marked as the solution to the initial question of the thread.
>Hi.
>
>I have a Grid class and my point is connect any click at header column to other method.
>
>Some information:
>
>- My Grid class doesn't have any column. (ColumnCount = -1) - So, I don't know if my grid will have one, two, or more columns. I create my cursor on the fly and just set RecordSource.
>- I had to add an ASSIGN method to property RecordSouce. So, I can do a loop to bind HEADER.CLICK to GRID.CLICKHEADER (I can change the cursor while my program is running.)
>- I need to know which column was clicked. If I try GRID.ACTIVECOLUMN, I got the column that the cursor is. For example: If the cursor is stoped in column1 and I click in third column, ActiveColumn returns 1 (I need to get the number 3)
>
>Said that, I can't add any code at HEADER.CLICK, because it didn't exist yet. I already did it work using MemberClass, but I would like to do that using BindEvent()!
>
>
>* RecordSource_Assign
>LPARAMETERS vNewVal
>THIS.RecordSource = m.vNewVal
>For Each oCol In This.Columns
>   BindEvent(oCol.Objects[1],"Click",This,"ClickHeader")
>EndFor
>
>
>The main point is change the cursor order.
>
>Is it possible?

Of course it is :-)
There is almost nothing inpossible in VFP :o)


In ClickHeader put:
AEVENTS(laEvnts,0)

WAIT WINDOW laEvnts[1,1].Parent.Name && You will see ColumnName here
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform