|
-
Apr 6th, 2008, 07:56 AM
#1
Thread Starter
New Member
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
-
Apr 6th, 2008, 09:26 AM
#2
Frenzied Member
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?

EDIT:
Run this demo and see. It can nicely detect a sub item click on text label or icon.
Last edited by zeezee; Apr 6th, 2008 at 09:35 AM.
-
Apr 6th, 2008, 10:50 AM
#3
Thread Starter
New Member
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.
-
Apr 6th, 2008, 02:38 PM
#4
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
Waiting for a full featured smart phone with out marrying a provider
Go Android
Go raiders 
-
Apr 7th, 2008, 04:11 AM
#5
Thread Starter
New Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|