ToolTip.ShowAlways 속성

정의

부모 컨트롤이 활성화되지 않은 경우에도 도구 설명 창이 표시되는지를 나타내는 값을 가져오거나 설정합니다.

public:
 property bool ShowAlways { bool get(); void set(bool value); };
public bool ShowAlways { get; set; }
member this.ShowAlways : bool with get, set
Public Property ShowAlways As Boolean

속성 값

Boolean

도구 설명이 항상 표시되면 true이고, 그렇지 않으면 false입니다. 기본값은 false입니다.

예제

다음 코드 예제에서는 클래스의 인스턴스를 ToolTip 만들고 인스턴스가 만들어진 인스턴스와 Form 연결합니다. 그런 다음, 이 코드는 지연 속성 AutoPopDelayInitialDelayReshowDelay. 또한 클래스의 ToolTip 인스턴스는 폼이 활성 상태인지 여부에 관계없이 ToolTip 텍스트를 표시할 수 있도록 속성을 true 설정합니다ShowAlways. 마지막으로, 이 예제에서는 도구 설명 텍스트를 폼의 컨트롤 2개(a Button 및 a CheckBox)와 연결합니다. 이 코드 예제에서는 예제에 정의된 메서드가 명명된 컨트롤과 명명 checkBox1``button1 된 컨트롤을 포함하는 Button 메서드 내에 Form 있어야 하며 CheckBox 메서드가 해당 생성자Form에서 호출되어야 합니다.

// 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" );
}
// 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");
}
' 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

설명

ShowAlways 속성을 사용하면 컨테이너 ToolTip 가 활성화되지 않은 경우에도 도구 설명 창을 표시할 수 있습니다. 도구 설명 창이 표시 될 수 있도록 모덜리스 창 애플리케이션에서이 기능을 사용할 수 있는 모덜리스 창에 관계 없이 활성 상태인 합니다. 이 기능은 도구 설명 창을 표시하는 여러 컨트롤이 포함된 컨트롤을 사용하여 UserControl컨트롤을 만들려는 경우에도 유용합니다. 양식의 UserControl 활성 창이 아닌 경우가 많으므로 이 속성을 설정하면 true UserControl 언제든지 도구 설명 창을 표시할 수 있습니다.

적용 대상

추가 정보