Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid control
Message
From
03/06/1998 04:55:25
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
02/06/1998 23:15:57
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00104263
Message ID:
00104291
Views:
19
>I want the grid do not loop when the right or left key pressed, how to do that ?
>
>regards
Winan,
As Barbara suggested, trap the arrows in keypress and add nodefault. This is easy for one specific grid. If you gonna make it for a lot of grids then class comes to mind. A textbox class could do that but would be cumbersome to add to grid w/o building a builder. So a grid class would be better :
* All we need is to trap left-right arrows before column change
* Grid.beforerowcolchange
* Prevent left arrow looping
WITH this
   IF lastkey() = 19 and ;
	.columns(.activecolumn).columnorder = 1
	NODEFAULT
   ENDIF
* Prevent right arrow looping
   IF lastkey() = 4 and ;
	.columns(.activecolumn).columnorder = ;
	.columncount
        NODEFAULT
    ENDIF
ENDWITH
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform