Click here to Skip to main content
16,005,241 members
Home / Discussions / C#
   

C#

 
GeneralRe: ToolTips Pin
hpetriffer14-Mar-06 22:44
hpetriffer14-Mar-06 22:44 
GeneralRe: ToolTips Pin
V.14-Mar-06 22:50
professionalV.14-Mar-06 22:50 
GeneralRe: ToolTips Pin
hpetriffer14-Mar-06 23:01
hpetriffer14-Mar-06 23:01 
GeneralRe: ToolTips Pin
V.14-Mar-06 23:06
professionalV.14-Mar-06 23:06 
GeneralRe: ToolTips Pin
hpetriffer14-Mar-06 23:15
hpetriffer14-Mar-06 23:15 
GeneralRe: ToolTips Pin
V.14-Mar-06 23:31
professionalV.14-Mar-06 23:31 
GeneralRe: ToolTips Pin
hpetriffer14-Mar-06 23:37
hpetriffer14-Mar-06 23:37 
AnswerRe: ToolTips Pin
cbhkenshin14-Mar-06 23:05
cbhkenshin14-Mar-06 23:05 
hi,

you can change the tool tip text when ever needed.
toolTip1.SetToolTip(this.button1, "My button1");

the follwing was from an external help:

The following code example creates an instance of the ToolTip class and associates the instance with the Form that the instance is created within. The code then initializes the delay properties AutoPopDelay, InitialDelay, and ReshowDelay. In addition the instance of the ToolTip class sets the ShowAlways property to true to enable ToolTip text to always be display regardless of whether the form is active. Finally, the example associates ToolTip text with two controls on a form, a Button and a CheckBox. The code example requires that the method defined in the example is located within a Form that contains a Button control named button1 and a CheckBox control named checkBox1, and that the method is called from the constructor of the Form.

Visual Basic
' This example assumes that the Form_Load event handling method
' is connected to the Load event of the form.
Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles MyBase.Load
' Create the ToolTip and associate with the Form container.
Dim toolTip1 As New ToolTip()

' Set up the delays for the ToolTip.
toolTip1.AutoPopDelay = 5000
toolTip1.InitialDelay = 1000
toolTip1.ReshowDelay = 500
' Force the ToolTip text to be displayed whether or not the form is active.
toolTip1.ShowAlways = True

' Set up the ToolTip text for the Button and Checkbox.
toolTip1.SetToolTip(Me.button1, "My button1")
toolTip1.SetToolTip(Me.checkBox1, "My checkBox1")
End Sub


C#
// This example assumes that the Form_Load event handling method
// is connected to the Load event of the form.
private void Form1_Load(object sender, System.EventArgs e)
{
// Create the ToolTip and associate with the Form container.
ToolTip toolTip1 = new ToolTip();

// Set up the delays for the ToolTip.
toolTip1.AutoPopDelay = 5000;
toolTip1.InitialDelay = 1000;
toolTip1.ReshowDelay = 500;
// Force the ToolTip text to be displayed whether or not the form is active.
toolTip1.ShowAlways = true;

// Set up the ToolTip text for the Button and Checkbox.
toolTip1.SetToolTip(this.button1, "My button1");
toolTip1.SetToolTip(this.checkBox1, "My checkBox1");
}


C++
// This example assumes that the Form_Load event handling method
// is connected to the Load event of the form.
void Form1_Load( Object^ sender, System::EventArgs^ e )
{
// Create the ToolTip and associate with the Form container.
ToolTip^ toolTip1 = gcnew ToolTip;

// Set up the delays for the ToolTip.
toolTip1->AutoPopDelay = 5000;
toolTip1->InitialDelay = 1000;
toolTip1->ReshowDelay = 500;
// Force the ToolTip text to be displayed whether or not the form is active.
toolTip1->ShowAlways = true;

// Set up the ToolTip text for the Button and Checkbox.
toolTip1->SetToolTip( this->button1, "My button1" );
toolTip1->SetToolTip( this->checkBox1, "My checkBox1" );
}


J#
// This example assumes that the Form_Load event handling method
// is connected to the Load event of the form.
private void Form1_Load(Object sender, System.EventArgs e)
{
// Create the ToolTip and associate with the Form container.
ToolTip toolTip1 = new ToolTip();
// Set up the delays for the ToolTip.
toolTip1.set_AutoPopDelay(5000);
toolTip1.set_InitialDelay(1000);
toolTip1.set_ReshowDelay(500);
// Force the ToolTip text to be displayed whether or not the form
// is active.
toolTip1.set_ShowAlways(true);
// Set up the ToolTip text for the Button and Checkbox.
toolTip1.SetToolTip(this.button1, "My button1");
toolTip1.SetToolTip(this.checkBox1, "My checkBox1");
} //Form1_Load



GeneralRe: ToolTips Pin
hpetriffer14-Mar-06 23:17
hpetriffer14-Mar-06 23:17 
Questionhow to find "full path of the last saved file" Pin
hunterofdarkangel14-Mar-06 22:04
hunterofdarkangel14-Mar-06 22:04 
AnswerRe: how to find "full path of the last saved file" Pin
hpetriffer14-Mar-06 22:17
hpetriffer14-Mar-06 22:17 
AnswerRe: how to find "full path of the last saved file" Pin
albCode14-Mar-06 22:21
albCode14-Mar-06 22:21 
Questionoutofmemoryexception Pin
Vineet Rajan14-Mar-06 21:54
Vineet Rajan14-Mar-06 21:54 
AnswerRe: outofmemoryexception Pin
Steve Hansen14-Mar-06 22:24
Steve Hansen14-Mar-06 22:24 
AnswerRe: outofmemoryexception Pin
albCode14-Mar-06 22:30
albCode14-Mar-06 22:30 
AnswerRe: outofmemoryexception Pin
malharone15-Mar-06 3:03
malharone15-Mar-06 3:03 
AnswerRe: outofmemoryexception Pin
mcljava15-Mar-06 13:15
mcljava15-Mar-06 13:15 
Questionsmart client application in C# Pin
anup nambiar14-Mar-06 21:42
anup nambiar14-Mar-06 21:42 
AnswerRe: smart client application in C# Pin
CWIZO15-Mar-06 2:22
CWIZO15-Mar-06 2:22 
QuestionNeed a Text Editor .dll with MS Word ToolBars for Win Forms!!! Pin
amin_behzadi14-Mar-06 21:18
professionalamin_behzadi14-Mar-06 21:18 
AnswerRe: Need a Text Editor .dll with MS Word ToolBars for Win Forms!!! Pin
Maqsood Ahmed14-Mar-06 21:52
Maqsood Ahmed14-Mar-06 21:52 
GeneralRe: Need a Text Editor .dll with MS Word ToolBars for Win Forms!!! Pin
amin_behzadi15-Mar-06 1:43
professionalamin_behzadi15-Mar-06 1:43 
GeneralRe: Need a Text Editor .dll with MS Word ToolBars for Win Forms!!! Pin
Maqsood Ahmed15-Mar-06 17:58
Maqsood Ahmed15-Mar-06 17:58 
QuestionTabcontrol background colour? Pin
2hdass14-Mar-06 18:10
2hdass14-Mar-06 18:10 
AnswerRe: Tabcontrol background colour? Pin
hpetriffer14-Mar-06 19:21
hpetriffer14-Mar-06 19:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.