Detect click on picture in MSFlexGrid
Hi there...
I need to create a grid that display column with a picture and text.
The picture lets say it a small clock and 1mm from it to the right the text starts, lets say "Wake up"
I want to catch a click event ON THE PICTURE ONLY AND NOT ON THE TEXT OR ALL CELL.
One way I found is to devide the picture and the text into two columns, but I couldn't find way to hide the grid line between the two columns to let it seems as one.
If someone have any idea how to do that I will realy aapreciate it.
One thing! I have to use the MSFlexGrid and cannot use other grid control.
Thanks
yaron
Re: Detect click on picture in MSFlexGrid
I think the better solution would be a List View if you are going to use Icons. or pictures.
Why do you need use ONLY Flex Grid?
:wave:
EDIT:
Run this demo and see. It can nicely detect a sub item click on text label or icon.
Re: Detect click on picture in MSFlexGrid
Because I have a lot of columns and because of the Grid properties I cannot use other control.
BUT I think I got a thread.
I can get the X and Y mouse click location from the MouseDown Event and compare it to the ColPos. I can define a range to the click that I consider as click on the picture.
Regarding the Text I am checking if there is a way to set left margine to a specific column.
Re: Detect click on picture in MSFlexGrid
Could you do this:
With the grid click event
With grid
if .row = 10 and .col = 2 then 'the row and col your pic is in
pic is clicked
end if
Re: Detect click on picture in MSFlexGrid
This solution will happend even if I will click on the text, something that I dont want. Unless i will find a way to hisde the grid between the two columns