Results 1 to 5 of 5

Thread: Detect click on picture in MSFlexGrid

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2008
    Posts
    10

    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

  2. #2
    Frenzied Member
    Join Date
    Jul 2007
    Posts
    1,306

    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.
    IIF(Post.Rate > 0 , , )

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2008
    Posts
    10

    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.

  4. #4
    PowerPoster isnoend07's Avatar
    Join Date
    Feb 2007
    Posts
    3,237

    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

  5. #5

    Thread Starter
    New Member
    Join Date
    Apr 2008
    Posts
    10

    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
  •  



Click Here to Expand Forum to Full Width