In my custom grid class I have this code in a custom Setup method:
LOCAL loColumn As Column, loControl As Control, lnHeight As Integer, lnRows
As Integer, ;
lnScrollHeight As Integer
WITH THIS
.ReadOnly = .T.
FOR EACH loColumn IN .Columns
IF loColumn.FontName # .FontName
loColumn.FontName = .FontName
ENDIF
BINDEVENT(loColumn.Header1, "RightClick", THIS, "HandleRightClick")
FOR EACH loControl IN loColumn.Controls
IF loControl.FontName # loColumn.FontName
loControl.FontName = loColumn.FontName
ENDIF
*!* Handle a double click for any control in the grid
*!* Processed by the grid double click
IF PEMSTATUS(loControl, "DblClick", 5)
BINDEVENT(loControl, "DblClick", THIS, "DblClick")
ENDIF
ENDFOR
ENDFOR
IF .IntegralHeight
lnScrollHeight = IIF(BITAND(.ScrollBars,1) = 1, SYSMETRIC(8), 0)
lnHeight = .Height - .HeaderHeight - lnScrollHeight
lnRows = ROUND(lnHeight/.RowHeight,0)
lnHeight = .RowHeight*lnRows + .HeaderHeight + lnScrollHeight
.Height = lnHeight + 1
ENDIF
ENDWITH

The behaviour for RightClick and DblClick is handled at the form level. One
use is when a user double clicks a row in the grid, a value (usually a
table primary key), is sent to another form.

Laurie

On 28 November 2014 at 20:54, Allen <[email protected]> wrote:

> http://msdn.microsoft.com/en-us/library/ms947678.aspx
> This might give some ideas
> Al
>
> -----Original Message-----
> From: ProfoxTech [mailto:[email protected]] On Behalf Of Gene
> Wirchenko
> Sent: 28 November 2014 21:35
> To: [email protected]
> Subject: bindevents(): What Use?
>
> Dear Vixens and Reynards:
>
>       I keep seeing various references to bindevents() and am
> wondering what the hoopla is.  Usually, you can just add some code to
> an event method.  Is there an example somewhere of a non-trivial use
> of it that I could play with?
>
>
>
> ---
> This email is free from viruses and malware because avast! Antivirus
> protection is active.
> http://www.avast.com
>
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/camvtr9c9tvcfdpbp55v6seqzkjzcjwlav1vdy2d+y-dfgaj...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to