Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with "CLICK EVENT"

Status
Not open for further replies.

lailong20002

Programmer
Mar 8, 2002
1
0
0
US
i have a list of data items display on screen. i also have a check box for each item. (i use the check box to mark when i receive the items in to the store.) Since, there are only 10 items display per screen. If i want to see the item 16 (for example), i have to use the scroll bar to scroll down. But when i mark that item (16), it suddenly automatic scroll up to the 1st item of that data list on the 1st screen. So, my question is HOW CAN I KEEP/MAKE THAT ITEM (#16) TO STAY/DISPLAY WHERE IT'S AND THE SCREEN NOT BEING SCROLL UP TO THE TOP WHENEVER I CLICK THE CHECKBOX?
I know my question not really clear. But please help me, it's because it's really important for my career. Thnk you very much.
 
HI

1. I think you are using a grid.
2. In the checkbox click event or some suitable event.. you are having a code to skip to the next item.. when that is chosen. Also you must be putting the code.. IF EOF() .. GO TOP..

SO with these assumptions, I suggest you to change that small piece of code..
IF EOF()
GO BOTTOM
ENDIF
in the place of GO TOP or LOCATE

That will change your scenario. Hope this helps you. :) ramani :-9
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
I've found VFP likes to send the cursor back to the top when programmatically setting the focus to the grid under seemingly random circustances. Try issuing a Grid.Refresh() before setting the focus on the grid.

Ian
 
I Bet you have a ThisForm.Refresh() or equivalent command in the AfterRowColumnChange() event in the grid. This has the effect of resetting the datasource in the grid. Remove this and all should be OK
Dave CRozier

Dave Crozier
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top