Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug in Grid:Column:Image.click()
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Bug in Grid:Column:Image.click()
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01391437
Message ID:
01391437
Views:
166
Just thought I would share this little buglet I found in the VFP grid.

Here's what you do to recreate it:

Create a form. Put the following code in the LOAD:
CREATE CURSOR _cTest (cTest C(20), cTest2 C(20))
APPEND BLANK
APPEND BLANK
LOCATE
Drop a grid on the form. Set the grid to two columns and set the recordsource to _cTest. Drop an image control in the second column, set it as the current control in the column and set sparse to .F. Put the following code in the Click method of the image control:
WAIT WINDOW "In CLICK()"
Run the form. Click on the image on the FIRST record. The first click selects the row and column. The second click (click slowly, these are single clicks) fires the CLICK() method. So far so good.

Click on the SECOND record image. Once again, the first click selects the cell and the second click fires the Click() method.

Now, click on the image in the FIRST record. First click selects the row. Second click does nothing. Third click does nothing (etc etc etc). Click on the FIRST column on the first record, then click back on the image on the FIRST row. First click selects and second click fires the click()

WORK AROUND: Put the code for the image.click() into the mousedown() instead...

Menachem
Menachem Bazian, CPA
President
BC Consulting Services, Inc.
973-773-7276
Menachem@BazianCentral.com
Next
Reply
Map
View

Click here to load this message in the networking platform