Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Screen Jump with Grids
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00374674
Message ID:
00387217
Views:
15
>>When I have programmed screens with grids on them and I click on the grid, it moves the screen and usually hides the controls that I have at the bottom of the screen. Is there a way to prevent this? Is it a bug in Foxpro?
>
>Hey Jim!
>
>Have you tried stepping through with the debugger to see what is causing the jumping? If this doesn't help, post a stripped down verion of the form and grid that still exhibits the problem.

I was about to post the same problem when I found this thread in my search. Two of my grids make the whole form jump when they are clicked. The other grids don't do that. One of these grids has code in its click event which runs another form. The grid.click is called from the .click of each grid.columnX.textbox. The jump causes the adjacent record to be selected. The other jumping grid doesn't have .click code. My grid class has these procedures:

basegrid.When
IF RECCOUNT(THIS.Recordsource) = 0
	RETURN .F.
ENDIF
It jumps only when there are records in the grid, so the .When doesn't return .F.

basegrid.BeforeRowColChange
LPARAMETERS nColIndex
IF LASTKEY() = 13 OR LASTKEY() = 9 && [Enter] & [Tab]
	IF nColIndex = THIS.ColumnCount
		KEYBOARD "{CTRL+TAB}"
	ENDIF
ENDIF
IF LASTKEY() = 15 && [Shift-Tab]
	IF nColIndex = 1
		KEYBOARD "{CTRL+SHIFT+TAB}"
	ENDIF
ENDIF
A mouse click shouldn't put a 9, 13, or 15 in LASTKEY() and a WAIT WINDOW confirms that it doesn't.

I am not using a framework and there is no code changing the value of form.top. It doesn't seem to matter if grid.ReadOnly is .T. or .F. It really looks like a grid bug, and it's maddeningly inconsistent. Someone else must have seen this. I use vfp6 sp3.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform