Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange behavior with image in grid
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01177690
Message ID:
01177696
Views:
13
Pictures in grids can be tricky... I've done a variety of experience with this.

First, the dblClick, rightClick, or even Click won't be available until the control actually has received focus from the grid... So, if you are on row 5 of your grid, and click on the image in row 2 of your grid, the click will just bring focus to the row and then the control. It takes ANOTHER click to actually trigger whatever code you have in the control.

Second, when you described a class to handle the right click... did you actually do a class of the Grid, or the actual IMAGE... it should be the image control.

Finally, I would try moving the code into the mouseDown event of the image instead of any of the "click" events... More often than not, if a user is trying to click on an image, it is intentional to act on that... This way, the mouse-down gets fired, runs through the rest of the grid focus/row change and can handle your shortcut menu.

HTH.




>Hi all,
>I really do not know to explain this strange behaviour. A grid: the third column has an image with four different type of pictures . A dblclick or a rightclick into the image calls a shortcut (I've built a class to do this); well, sometimes the shortcut is not called!. When? If the next row has the same picture of the previous and is higher then the previous. The different picture or passing from 3 to 7 row (i.e.)with the same picture do the job: from 7 to 3 not.
>A second bad behaviour: I must rightclick twice to call the shortcut, instead the dblclick is correct.
>I never heard something like this.
>Some idea to avoid this incredible behaviour?
>Thanks
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform