Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
.activatecell in Grid
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00117960
Message ID:
00119199
Views:
39
Thanks Kamal,

Exactly what i'm looking for. I didn't notice the relativerow and relative column in the grid properties.



>Hi Alvin,
>
>Add the following code in the KeyPress() event of the last column's control and it will do the job:
>
LPARAMETERS nKeyCode, nShiftAltCtrl
>*-- Check if the key pressed was ENTER or TAB and if so, go to the next row
>IF (nShiftAltCtrl = 0) and INLIST(nKeyCode, 9, 13)
>   lnRow = this.Parent.Parent.Relativerow
>   this.Parent.Parent.ActivateCell(lnRow + 1, 2)
>ENDIF
>
>
>>Having probems usign this method.
>>
>>I just would like to move the cursor down one line after the user press enter (in a grid). but somehow activatecell(activerow+1,activecolumn) doesn't work because activatecell uses a relative grid column row coordinate.
>>
>>Using keyboard (DNARRAOW BACKTAB ) command works ok. but looks weird with the cursor move down then left :)
>>
>>TIA
Previous
Reply
Map
View

Click here to load this message in the networking platform