Longer Lasting Tooltip?

Hi,
I currently have a Help Tag (tooltip) which displays when the cursor is over my ListBox. The problem I am having, is that the tooltip disappears after a few seconds as normal.

What I would like is for the tooltip to display continuously whilst the cursor is over the ListBox.
Does anyone have any ideas, how I can have some text (like a tooltip) follow the cursor continuously whilst it is over the ListBox.

Any help appreciated.

Thank you all in advance.

Hi Richard,

I am not sure that you really want to get a permanent ‘tooltip’ above your ListBox… either at the same location or following your mouse cursor.

I’m pretty sure I do :slight_smile:

Probably you will need to disable the current one and simulate one by hand with show(), hide(). http://documentation.xojo.com/index.php/ToolTip

The desire in the OS is to keep ToolTips consistent with their display time. (Of course this gets erratic when heavy processing is occurring, however briefly.)

So keeping ToolTips - the way they were intended - persistent isn’t a good idea.

But if that’s what you want to do, it’s not hard to make a persistent type yourself, and make it look a little different as so not to make the overall computer experience of the user inconsistent.

Richard,

I use this on a listbox of mine Under the MOUSEMOVE Event and my tooltip stays up the whole time my mouse is over the Row and Column I want. If I would remove “tooltip.hide” The Tool Tip stays up.

  // Tool Tip for Mouse Over "Connected" Icon (Only when connected)
  Dim row, column As Integer
  row = Me.RowFromXY(x, y)
  column=Me.ColumnFromXY(x, y)
  
  // Hide Tool Tip when we move the mouse away from the Row/Column we want
// Remove this to achieve a long lasting Tool Tip
  ToolTip.Hide 
  
  For xx as Integer = 0 to UBound(EVIP_Active_SocketCount_Array)
    if Row = EVIP_Active_SocketCount_Array(xx).SocketNumber  AND Column = 0 Then // This is where you choose which Row/Column to have ToolTipShow up for.
      Tooltip.Show("Connected to: " + EndOfLine + _
      EVIP_Active_SocketCount_Array(xx).RemotePeerICPName + EndOfLine + _
      EVIP_Active_SocketCount_Array(xx).RemoteAddress + " ("+Str(EVIP_Active_SocketCount_Array(xx).RemotePeerICPID)+")",  System.MouseX, System.MouseY, True)
    End if
  Next xx
  

HTH

See http://documentation.xojo.com/index.php/ToolTip
When you show one you can make it autohide - or not
http://documentation.xojo.com/index.php/ToolTip.Show

I tried to place the example tooltip code in a listbox mousemove,and tooltip.hide in mousexit.

I had to add the current placement of the listbox to X and Y for the tootip to appear above the mouse cursor.

Cool, though.

Try using System.MouseX & System.MouseY

X, Y in the listbox events are relative to the control

This places the tooltip right at the tip of the mouse cursor arrow :

Tooltip.Show("hello", System.MouseX, System.MouseY-20, True)

Thanks Norman.

Just noticed Chrome uses the same trick just under the “close tab” x and the “new tab” button.