ToolTip show doesn't work in dialog for a pictureBox

youki 1,016 Reputation points
2021-01-10T15:16:04.273+00:00

Hello,
I'm trying to set the tooltip with an autopopupdelay of 5000 and reshowdelay of 0 (for showing it permanently as long as the cursor is on the pictureBox).

  • .Net 4

I can use the ToolTip.SetToolTip but when i use the show method nothing appears (https://learn.microsoft.com/de-de/dotnet/api/system.windows.forms.tooltip.show?view=net-5.0).

I've tried to set it in the constructor and in a MouseHover/ MouseEnter event.

_toolTip.Show("Beispiel Information", pbProcess, 5000);  

PS:

I can set the value also with ToolTip.SetToolTip as follows: https://learn.microsoft.com/de-de/dotnet/api/system.windows.forms.tooltip.showalways?view=net-5.0.

  1. The tooltip doesn't appear. I have to use the only button in the dialog, after that when i hover over the pictureBox the tooltip appears. I tried "active = true" and "showAlways = true" but it doesn't help. I don't understand what blocks the tooltip before using the button.
  2. The ReshowDelay doesn't show the tooltip permanently, is there a solution?

Regards

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,862 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,458 questions
0 comments No comments
{count} votes

Accepted answer
  1. youki 1,016 Reputation points
    2021-01-10T16:12:15.34+00:00

    Ok,
    I think there is no solution except setting a timer for reactivating the tooltip.

    I found some answers here and on a few other pages:

    https://ux.stackexchange.com/questions/3931/tooltips-with-infinite-timeout

    Thank you.


1 additional answer

Sort by: Most helpful
  1. Castorix31 82,241 Reputation points
    2021-01-10T16:04:20.083+00:00

    This works for me with a PictureBox in a Dialog Box (in Form_Load) =>

    (Tooltip displayed immediately and permanently)

    ToolTip toolTip1 = new ToolTip();          
    toolTip1.AutoPopDelay = 0;           
    toolTip1.InitialDelay = 1;            
    toolTip1.ReshowDelay = 0;           
    toolTip1.ShowAlways = true;           
    toolTip1.SetToolTip(this.pictureBox1, "Test Tooltip");
    
    1 person found this answer helpful.
    0 comments No comments