Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide tooltip of truncated checkbox

I have a checkbox which is resized together with my main form. The text of this checkbox has some relevant information, so it got an own tooltip control (with mutliline content).

If the form gets small enough the text of my checkbox is truncated (AutoEllipsis = true). But if i move my mouse over this control i get two tooltips which overlap each other. The first shows the complete text of the truncated checkbpox and the second shows the tooltip i added in the code.

I presume that the first tooltip is caused by setting the AutoEllipsis property to true? What can i do to prevent this builtin tooltip to be shown? I didn't find any properties i could overload or something... If possible I would like to keep the AutoEllipsis property as it handles the truncation of too large text.

like image 614
AlexS Avatar asked Nov 12 '22 21:11

AlexS


1 Answers

With Windows.Controls : You can maybe override the method OnToolTipOpening to cancel the first tooltip

With Windows.Forms : You can override the method WndProc and treat the TTM_POPUP message

like image 77
Troopers Avatar answered Nov 14 '22 21:11

Troopers