Information générale
Catégorie:
Gestionnaire d'écran & Écrans
>Nick,
>
>RE: Moving from last column in this row to first column in next row
>
>I've continued to think about your original problem. The solution presented does what you wanted and you may not want to go into it any further. But, I was curious as to "how" to get the activatecell method to work. The code below represents what I've found. I think it does everything you want. Visually I think it looks better at runtime. Let me know what you think.
>
>
>*In BeforeRowColChange
>LPARAMETERS nColIndex
>
>nBrow=thisform.grid1.RelativeRow
>
>IF nColIndex=this.ColumnCount AND INLIST(LASTKEY(),4,9,13)
>
> thisform.grid1.ActivateCell(thisform.grid1.RelativeRow+1,1)
> NODEFAULT
> nNrow=thisform.grid1.RelativeRow
>
> IF nBrow=nNrow
> thisform.grid1.DoScroll(1)
> thisform.grid1.ActivateCell(thisform.grid1.RelativeRow+1,1)
> NODEFAULT
> ENDIF
>
>ENDIF
>
>*Greg
Hi Greg, I tried the new code (clever trick) and it works fine except that once it gets to the end of the last row and column, if keep hitting tab, it scolls the grid up. However, it won't let you click into another cell on the grid because it locked on the last row. If you hit shift tab to go back one cell then you are able to click anywhere in the grid again.
Thanks
Nick Patel
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement