Krypton-Suite-Legacy-Archive / Krypton-NET-5.470

A update to Component factory's krypton toolkit to support the .NET 4.7 framework.
BSD 3-Clause "New" or "Revised" License
78 stars 20 forks source link

[BUG] Control and buttonspec with tooltips both appear at same time #262

Closed Cocotteseb closed 4 years ago

Cocotteseb commented 4 years ago

Let's have for example a KryptonTextBox with a tooltip. On this Textbox we add a buttonspec which has a tooltip The tooltip of the textbox (from VisualContainerControlBase) appears alone, that's correct. The tooltip of the buttonspec appears along with the tooltip of the textbox : that's not intended and not correct. image

image

image

Related to feature : https://github.com/Krypton-Suite-Legacy/Krypton-NET-5.470/issues/85

I have no idea how to correct this. Can someone helps ? Thanks

Smurf-IV commented 4 years ago

I can see pro's and con's for this. The problems, is that for every control that allows to have "ButtonExtra's" they handle the tooltips themselves (No base class code!). So do "we" want to introduce 1) Base class code for extra (Best, but the greatest impact) 2) Have some magic in every tooltip extra handler to determine if the parent tooltip should be "closed" 3) Have a "design time option" to combine with 2 above? e.g. Combine with AllowButtonSpecToolTips

Smurf-IV commented 4 years ago

Adding new AllowButtonSpecTooltipPriority

PWagner1 commented 4 years ago

Hi @Cocotteseb

I've merged @Smurf-IV fixes into v5.500, and will be published in build 2006 along with other fixes.

Cocotteseb commented 4 years ago

Wow, that was quick ! Thanks @Smurf-IV for the reactivity. :) That's an interesting solution indeed! Thanks @Wagnerp, I've made the modification in my own repository too (give full credits to the author with a backlink to this thread)

It does work perfectly when you are "already" in the control. A little less when you are outside the control and then come "directly" on the buttonspec. Here is an example : bandicam 2020-05-13 22-10-29-385

The tooltip is displayed in the ToolTipManager on the MouseEnter event. Maybe using the MouseMove event and waiting for a small distance before activating the tooltip could be a way to overcome the above drawback ? What do you think ?