Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid & Activate Cell upgrade quirk
Message
From
12/10/1998 04:43:15
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00145831
Message ID:
00145844
Views:
53
>>>I have a app which I plan to distribute in vfp3 (for the 16bit'ers) and vfp5.
>>>
>>>I have done all my development in 3 and have found the port up to 5 really great. One niggle is that I have a grid with no horizontal scroll bar but a keypress event on the last column to reset the grid back to the first cell when the user presses enter.
>>>
>>>this.parent.parent.activatecell(1,1)
>>>
>>>In vfp3 this moves the focus back to the first column
>>>In vfp5 the focus moves to the first VISIBLE column.
>>>
>>>What should I do to correct this?
>>>Sarah
>>Hi Sarah,
>>To row 1, col 1 really ?
* Beforerowcolchange
>>LPARAMETERS nColIndex
>>if lastkey() = 13 and ;
>>	this.activecolumn = this.columncount
>>	go top in (this.recordsource)
>>	this.refresh
>>endif
Cetin
>
>Cetin, thanks... but the important bit is the COLUMN 1, this code took me to row1 but not column 1 which is exactly what vfp3 let me do and what I need. Any other ideas?
>
>Sarah
Sarah,
With no code at all, when you press enter in last column where does cursor go ? It should go to first column so I needn't include code to setfocus to column 1. If not, I would suspect underlying code. This one explicitly setfocus to column 3 of top rec, when enter pressed on last column.
* Afterrowcolchange
LPARAMETERS nColIndex
if lastkey() = 13 and nColIndex = 1  && Pressed enter at last column
	go top in (this.recordsource)
	this.refresh
	this.columns(3).setfocus()
endif
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
Next
Reply
Map
View

Click here to load this message in the networking platform