{"id":444,"date":"2010-12-21T20:37:52","date_gmt":"2010-12-21T20:37:52","guid":{"rendered":"https:\/\/ibex.tech\/visualcpp\/?p=444"},"modified":"2026-06-17T09:25:28","modified_gmt":"2026-06-17T08:25:28","slug":"tooltip-text","status":"publish","type":"post","link":"https:\/\/ibex.tech\/visualcpp\/tooltip-text\/tooltip-text","title":{"rendered":"ToolTip Text"},"content":{"rendered":"<h4>Adding Tool Tip Text To Form Components<\/h4>\n<h5>Add this to the global variables &amp; classes declarations<\/h5>\n<pre><code>\r\n\tprivate: ToolTip^ toolTip1;\r\n<\/code><\/pre>\n<h5>Add this to the constructor<\/h5>\n<pre><code>\r\n\t\/\/----- CREATE TOOL TIP TEXT -----\r\n\ttoolTip1 = gcnew ToolTip;\r\n<\/code><\/pre>\n<h5>Add this to the formLoad Event<\/h5>\n<pre><code>\r\n\t\/\/-------------------------------\r\n\t\/\/----- SETUP TOOL TIP TEXT -----\r\n\t\/\/-------------------------------\r\n\ttoolTip1-&gt;AutoPopDelay = 5000;\t\t\/\/mS - time ToolTip remains visible if the pointer is stationary on a control with specified ToolTip text\r\n\ttoolTip1-&gt;InitialDelay = 800;\t\t\/\/mS\r\n\ttoolTip1-&gt;ReshowDelay = 500;\t\t\t\/\/mS - time before subsequent ToolTip windows appear as the pointer moves from one control to another\r\n\ttoolTip1-&gt;ShowAlways = true;\t\t\t\/\/Force the ToolTip text to be displayed whether or not the form is active.\r\n\r\n\ttoolTip1-&gt;SetToolTip(this-&gt;btnExit, \"Exit\");\r\n\ttoolTip1-&gt;SetToolTip(this-&gt;checkBox1, \"My checkBox1\");\r\n<\/code><\/pre>\n<p>ToolTip text is not displayed for controls that are disabled. Unless the ShowAlways property is set to true &#8211; if a button is disabled it doesn&#8217;t seem to work.  When you want to disable a button but say create a message box when its clicked, or have it still show tool tip text you can use:<\/p>\n<pre><code>\r\n-&gt;ForeColour = System::Drawing::SystemColors::ControlText\t\t\/\/for normal button\r\n-&gt;ForeColour = System::Drawing::SystemColors::InactiveCaptionText\t\/\/for disabled button\r\n<\/code><\/pre>\n<p>and then just to a check in the buttons click function.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Adding Tool Tip Text To Form Components Add this to the global variables &amp; classes declarations private: ToolTip^ toolTip1; Add this to the constructor \/\/&#8212;&#8211; CREATE TOOL TIP TEXT &#8212;&#8211; toolTip1 = gcnew ToolTip; Add this to the formLoad Event \/\/&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- \/\/&#8212;&#8211; SETUP TOOL TIP TEXT &#8212;&#8211; \/\/&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- toolTip1-&gt;AutoPopDelay = 5000; \/\/mS &#8211; time ToolTip [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55],"tags":[],"class_list":["post-444","post","type-post","status-publish","format-standard","hentry","category-tooltip-text"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/444","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/comments?post=444"}],"version-history":[{"count":4,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/444\/revisions"}],"predecessor-version":[{"id":448,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/444\/revisions\/448"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/media?parent=444"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/categories?post=444"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/tags?post=444"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}