Results 1 to 5 of 5
  1. #1
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    show comment over image (Excel 2003)

    I just started a new order / sales project and one of the things I've been asked to do is to have a feature whereby the user can hover over an image and have it pop-up a message with a picture and text in it.

    I know how to add pictures to a comment field but ideally I'd like to have an image that when the user hovers over it, it acts like a comment field that shows itself with this embedded pix and text. The image is a small round " [ i ] " which stands for "information" and so the user hovers over it to get a picture of the item being sold and its text.

    I tried putting a small image in a cell that had a comment but the comment never appeared since it seems the image had some higher priority or at least covered the cell enough such that the comment never displayed. Actually, even if I made the cell big, having a picture over the cell never invoked the comment. Although I'm not required to do this exact feature with an image but I'm trying to give the users exactly what the spec calls for unless I can't make it work that way.

    I am able to get a comment to appear when I use a button (with the "[ i ]" picture on it) and the commandbutton1_mousemove() event. I can't get the comment to go away though when I move away from the button. None of the other mouseX events seem to do anything (mouseup, or lostfocus, gotfocus)

    Any ideas?

    Deb

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: show comment over image (Excel 2003)

    I hope somebody will prove me wrong, but I don't think this is really feasible in an Excel worksheet. Perhaps you could realize it in a userform in Excel, but Access, VB (VB6 or .NET), C++ or Delphi seem much more suitable for such an application.

  3. #3
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: show comment over image (Excel 2003)

    Hmmmm, well that's not good [img]/forums/images/smilies/smile.gif[/img] Can you look at the attached sheet and see what I'm experimenting with? I used a button and a label with a picture and text for the caption. This is basically what I need as the text is just a few sentences to describe the picture. This is the same as if I'd used a pix in a comment which I can do ok.

    The problem in the workbook is the screen refresh. I do hide the label and button when they're clicked but they don't appear hidden even though I refresh the screen. I know they're gone because I can cursor to the cells under the button or label. Why isn't the screen updating working for this?

    Also, how do GotFocus and LostFocus work? I can't them these vents to do anything it seems.

    Thnx, Deb

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: show comment over image (Excel 2003)

    Instead of Me.Shapes("Label1").Visible = False, use Me.Label1.Visible = False, etc. The controls will be hidden correctly then.

    I think events such as GotFocus and LostFocus only apply when the controls are placed on a userform.

  5. #5
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: show comment over image (Excel 2003)

    Great, this wasn't as bad after all, eh? So now I'll just add code to run when the icon "i" is clicked that shows the appropriate pix + text. Then they'll have to click that picture to close it. That's good enough I think, just as automatic as a comment appearing when you hover over it, but it's close enough.

    Thanks for your help.
    Deb

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •