Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BindEvent() on grid.KeyPress does not fire
Message
From
24/06/2016 03:40:14
 
 
To
24/06/2016 03:28:36
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01637629
Message ID:
01637630
Views:
69
>Hi,
>
>Can't get a delegate method on grid.KeyPress() to fire:
>
>local grdKeyPressBindEvent
>grdKeyPressBindEvent = CreateObject('grdKeyPressBindEvent')
>grdKeyPressBindEvent.Show(1)
>
>define class grdKeyPressBindEvent as Form
>
>add object grd as grid with;
>   top = 10;
> , left = 10;
>
>procedure LOAD
>create cursor Test(Test1 C(10), Test2 C(10))
>insert into test values ('Test11', 'Test12')
>insert into test values ('Test21', 'Test22')
>go 1
>
>procedure init
>BindEvent(this.grd, 'KeyPress', this, 'grdKeyPress')
>
>procedure grdKeyPress
>lparameters nKeyCode, nShiftAltCtrl
>wait window Textmerge([grd.KeyPress(<<m.nKeyCode>>, <<m.nShiftAltCtrl>>)]) nowait noclear timeout 5 && never shows up
>
>enddefine
>
>
>Any idea why?
>
>Thanks

grd.AllowCellSelection must be set to .F., otherwise KeyPress() event fires at the textbox level.
----------------------------------
António Tavares Lopes
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform