Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Dynamic tooltip

Dynamic tooltip

Scheduled Pinned Locked Moved Visual Basic
questionannouncement
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cstrader232
    wrote on last edited by
    #1

    I have a tooltip defined for a datagridview cell. It displays when I hover the mouse over the cell. I'd like however to update the contents of that tooltip when it displays. How can I best do that? Is there a tooltip display event? The mousehover event doesn't seem to really work in this regard. Thanks

    D C D V 4 Replies Last reply
    0
    • C cstrader232

      I have a tooltip defined for a datagridview cell. It displays when I hover the mouse over the cell. I'd like however to update the contents of that tooltip when it displays. How can I best do that? Is there a tooltip display event? The mousehover event doesn't seem to really work in this regard. Thanks

      D Offline
      D Offline
      dan sh
      wrote on last edited by
      #2

      I think there is show and/or popup event. Not sure though

      HAPPY DIWALI[^]

      1 Reply Last reply
      0
      • C cstrader232

        I have a tooltip defined for a datagridview cell. It displays when I hover the mouse over the cell. I'd like however to update the contents of that tooltip when it displays. How can I best do that? Is there a tooltip display event? The mousehover event doesn't seem to really work in this regard. Thanks

        C Offline
        C Offline
        cstrader232
        wrote on last edited by
        #3

        Or perhaps mousehover would work if I knew how to reset it once it fired once (without having to move the mouse outside of and then back into the DGV).

        1 Reply Last reply
        0
        • C cstrader232

          I have a tooltip defined for a datagridview cell. It displays when I hover the mouse over the cell. I'd like however to update the contents of that tooltip when it displays. How can I best do that? Is there a tooltip display event? The mousehover event doesn't seem to really work in this regard. Thanks

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          If I get what you're talking about doing, there isn't an event like you're talking about. What you'd have to do is handle the DGV's CellMouseHover and probably CellMouseLeave events to interrogate the cell the mouse is over and set the ToolTip's Text property as the mouse moves.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007, 2008

          C 1 Reply Last reply
          0
          • D Dave Kreskowiak

            If I get what you're talking about doing, there isn't an event like you're talking about. What you'd have to do is handle the DGV's CellMouseHover and probably CellMouseLeave events to interrogate the cell the mouse is over and set the ToolTip's Text property as the mouse moves.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007, 2008

            C Offline
            C Offline
            cstrader232
            wrote on last edited by
            #5

            OK, well that made the whole thing painfully obvious -- just set the tooltip on the cellmouseenter event. DOH! Thanks

            1 Reply Last reply
            0
            • C cstrader232

              I have a tooltip defined for a datagridview cell. It displays when I hover the mouse over the cell. I'd like however to update the contents of that tooltip when it displays. How can I best do that? Is there a tooltip display event? The mousehover event doesn't seem to really work in this regard. Thanks

              V Offline
              V Offline
              Vengatachalapathy Palanivel
              wrote on last edited by
              #6

              You can make updatable tooltips by making use of the following steps using Javascript. For the first time, On mouse over event you can create a "DIV" control using "createElement" method with the respective text. Then, you can update the content of the "DIV" element innertext on mouse out event(you can hide this "DIV"). While creating the control make the "Control ID" uniform across all the cells, so that you don't need to recreate the control every time. If it's already there you can just make the display property to 'block' or else create the control newly. Hope this helps you.

              Regards, Vengat P

              D 1 Reply Last reply
              0
              • V Vengatachalapathy Palanivel

                You can make updatable tooltips by making use of the following steps using Javascript. For the first time, On mouse over event you can create a "DIV" control using "createElement" method with the respective text. Then, you can update the content of the "DIV" element innertext on mouse out event(you can hide this "DIV"). While creating the control make the "Control ID" uniform across all the cells, so that you don't need to recreate the control every time. If it's already there you can just make the display property to 'block' or else create the control newly. Hope this helps you.

                Regards, Vengat P

                D Offline
                D Offline
                Dave Kreskowiak
                wrote on last edited by
                #7

                This won't work in a Windows Forms app, just web...

                A guide to posting questions on CodeProject[^]
                Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                     2006, 2007, 2008

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups