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?
Sincerely,
Gene Wirchenko
_______________________________________________
Post Messages to: ProFox@leafe.com
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/
** 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.
http://msdn.microsoft.com/en-us/library/ms947678.aspx
This might give some ideas
Al
-----Original Message-----
From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Gene
Wirchenko
Sent: 28 November 2014 21:35
To: profoxtech@leafe.com
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.
_______________________________________________
Post Messages to: ProFox@leafe.com
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/00f401d00b4d$82f906d0$88eb1470$@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.
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 <profox@gatwicksoftware.com> wrote:
> http://msdn.microsoft.com/en-us/library/ms947678.aspx
> This might give some ideas
> Al
>
> -----Original Message-----
> From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Gene
> Wirchenko
> Sent: 28 November 2014 21:35
> To: profoxtech@leafe.com
> 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.
>
>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
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-dFgajHVg@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.
I use in a menu to capture events like "Resize".
E.
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
Post Messages to: ProFox@leafe.com
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/2124743535.607575.1417281156503.JavaMail.yahoo@jws10717.mail.gq1.yahoo.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.
The main purpose is to define event code at run time as opposed to
design time
This might help (Tamar Granor):
/"/ /In this session, we'll look at why BindEvent() and its cousins, the
Access and Assign methods, are so valuable. Using examples drawn from
real applications, we'll see how event binding lets you do things you
couldn't otherwise do, and simplifies code for other tasks"//
/
Thierry Nivelet
FoxInCloud
Give your VFP app a second life in the cloud
Le 28/11/2014 21:35, Gene Wirchenko a écrit :
> 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?
>
> Sincerely,
>
> Gene Wirchenko
>
>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
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/547C35FF.9040708@foxincloud.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.