Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add tooltip to a CStatic

I haven't been able to find a concise chunk of code that allows me to add/display tooltips to a CStatic (and CLed) control. Obviously, the standard code to do so does not apply for this type of control. Can someone post code snippets?

like image 701
Jason Avatar asked Nov 13 '12 15:11

Jason


People also ask

How do you display a tooltip?

Basic Tooltip HTML: Use a container element (like <div>) and add the "tooltip" class to it. When the user mouse over this <div>, it will show the tooltip text. The tooltip text is placed inside an inline element (like <span>) with class="tooltiptext" .

Which method is used to add tooltip text?

Use the setToolTipText method to set up a tool tip for the component.

Can tooltip have buttons?

A tooltip is a message box that is displayed when a user hovers over or gives focus to a UI element. The tool tip should be paired with an interactive UI element like a button. Tooltips should be used sparingly and contain succinct, supplementary information.

What is tooltip used for?

Definition: A tooltip is a brief, informative message that appears when a user interacts with an element in a graphical user interface (GUI). Tooltips are usually initiated in one of two ways: through a mouse-hover gesture or through a keyboard-hover gesture.


1 Answers

I don't know if this is still needed, but here's what I used to solve the problem: just add SS_NOTIFY to dwStyle when creating the static label. (or simply set "Nofity" "True" in the properties). That worked fine for me.

like image 109
chris Avatar answered Oct 01 '22 07:10

chris