ToolTip.InitialDelay 속성

정의

도구 설명이 나타날 때까지 걸리는 시간을 가져오거나 설정합니다.

public:
 property int InitialDelay { int get(); void set(int value); };
public int InitialDelay { get; set; }
member this.InitialDelay : int with get, set
Public Property InitialDelay As Integer

속성 값

Int32

도구 설명 창이 표시되기 전에 포인터가 컨트롤 위에 고정되어 있어야 하는 시간(밀리초)입니다.

예제

다음 코드 예제에서는 클래스의 인스턴스를 ToolTip 만들고 인스턴스가 만들어진 인스턴스와 Form 연결합니다. 그런 다음, 코드는 지연 속성을 AutoPopDelay초기화하고 ReshowDelay. InitialDelay 또한 클래스의 ToolTip 인스턴스는 폼이 활성 상태인지 여부에 관계없이 ToolTip 텍스트를 표시할 수 있도록 속성을 true 설정합니다ShowAlways. 마지막으로, 이 예제에서는 도구 설명 텍스트를 폼 Button 의 컨트롤 1과 a CheckBox에 대한 두 개의 컨트롤과 연결합니다. 코드 예제에서는 예제에 정의된 메서드가 명명된 컨트롤과 CheckBox 명명 button1 checkBox1, 된 컨트롤을 포함하는 Button 메서드 내에 Form 있고 메서드가 생성자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

설명

InitialDelay 속성을 사용하면 도구 설명 창을 표시하기 전에 대기하는 시간을 ToolTip 줄이거나 늘릴 수 있습니다. 경우 값은 InitialDelay 기간 내에 너무 긴 값으로 속성을 설정 하면 애플리케이션의 사용자는 애플리케이션 도구 설명 도움말이 모를 수 있습니다. 이 속성을 사용하면 지정된 시간을 단축하여 도구 설명이 빠르게 표시되도록 할 수 있습니다.

이 속성의 값은 32767을 초과할 수 없습니다.

도구 설명 창에 대해 일관된 지연 패턴을 사용하려는 경우 속성을 설정할 AutomaticDelay 수 있습니다. 속성은 AutomaticDelay 단일 시간 값에 따라 초기 값으로 , ReshowDelayInitialDelay 속성을 설정합니다AutoPopDelay. 속성을 설정할 InitialDelay 때마다 AutomaticDelay 속성은 속성과 동일한 값으로 AutomaticDelay 설정됩니다. 속성이 AutomaticDelay 설정되면 속성을 독립적으로 설정 InitialDelay 하여 기본값을 재정의할 수 있습니다.

적용 대상

추가 정보