For what it is worth, here is the code I use to bind the double click method 
of a textbox in any of the columns of a grid to a "seepasswd" method on the 
form:

** form INIT METHOD

thisform.binding()

** form BINDING METHOD

  With thisform.grid1
   For i = 1 to .ColumnCount -1
       BindEvent( .Columns(i).text1 , "DblClick" , thisform , "seepasswd" )
   EndFor
  EndWith

** form SEEPASSWD method

AEvents(aCallingEvent,0)


if vartype(aCallingEvent) <> "U"
   if Upper(aCallingEvent(2)) = "DBLCLICK"
        If not InList(Lastkey(),4,5,19,24)          && arrow keys

            Set Cursor Off

            With thisform
                 .lblClave.Visible = .t.
                 .txtClave.Visible = .t.
                 .txtClave.Value = _Screen.oAdm.descifra( curClaves.clave )
            EndWith

            = Inkey(3)

            With thisform.pfr.page1
                 .lblClave.Visible = .f.
                 .txtClave.Visible = .f.
                 .txtClave.Value = ""
            EndWith
            Set Cursor On
        endif
   endif
endif

Note:  the above method is written in Spanish. Clave means password. 
Descrifra is a method that deciphers a password and shows it in legible 
letters.
The reference to the arrow keys is there to avoid the method from firing if 
the user navigates the grid. It will only fire if the double click method is 
called.
When the user double clicks on any column of the grid, the bindevents 
technology delegates the code to the seepasswd method, that shows the 
password. BTW, this is a grid that shows in one column all the users and in 
the next column a series of illegible signs (the password) that is then 
deciphered as shown above. The rest of the columns in the grid show 
departments, permission levels, etc.

I am not sure whether you are using the bindevents correctly, so I sent you 
the above code as an example of how to use it. It works very well

Regards
Rafael Copquin



----- Original Message ----- 
From: "Tracy Pearson" <[email protected]>
To: <[email protected]>
Sent: Monday, March 02, 2009 3:39 PM
Subject: Re: BINDEVENT and Refresh


> What is the KEY() generated on the cursor the Grid has?
> Quick testing shows
>    Index On (obj.controlsource) Tag Tmp
> creates the tool tip on SET ORDER TO
>    tmp && (obj.controlsource)
>
> Tracy
>
> Bill Anderson wrote:
>> On Mon, Mar 2, 2009 at 10:42 AM, Tracy Pearson 
>> <[email protected]>wrote:
>>
>>> Is the delegate code firing?
>>> I've seen this odd behavior only when the grid didn't have focus.
>>>
>>> Tracy
>>>
>>
>> Yes, the delegate code is firing.
>>
>> Everything is working but the grid isn't displaying correctly. But if I 
>> go
>> to a command window and issue a refresh on the grid, it displays
>> appropriately.
>>
>> Bill
>>
>
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/04c9dd853a0347a6b62261126af79...@rafael
** 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