TabPage::ToolTipText Property
.NET Framework (current version)
Gets or sets the ToolTip text for this tab.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
This tab page belongs to a TabControl. The ToolTip text appears when the user moves the mouse over the tab if the ShowToolTips property of the TabControl is true. For more information about ToolTips, see the ToolTip class.
The following code example creates a TabControl with two TabPage objects. The TabControl is set to allow ToolTips, and the tab pages are assigned ToolTip text.
Use the System.Drawing and System.Windows.Forms namespaces for this example.
using namespace System::Drawing; using namespace System::Windows::Forms; public ref class Form1: public Form { private: TabControl^ tabControl1; TabPage^ tabPage1; TabPage^ tabPage2; void MyTabs() { this->tabControl1 = gcnew TabControl; this->tabPage1 = gcnew TabPage; this->tabPage2 = gcnew TabPage; array<Control^>^tabPages = {this->tabPage1,this->tabPage2}; this->tabControl1->Controls->AddRange( tabPages ); this->tabControl1->Location = Point(35,25); this->tabControl1->Size = System::Drawing::Size( 220, 220 ); // Shows ToolTipText when the mouse passes over tabs. this->tabControl1->ShowToolTips = true; // Assigns String* values to ToolTipText. this->tabPage1->ToolTipText = "myTabPage1"; this->tabPage2->ToolTipText = "myTabPage2"; this->Size = System::Drawing::Size( 300, 300 ); array<Control^>^formControls = {this->tabControl1}; this->Controls->AddRange( formControls ); } public: Form1() { MyTabs(); } }; int main() { Application::Run( gcnew Form1 ); }
.NET Framework
Available since 1.1
Available since 1.1
Show: