ToolTip.AutoPopDelay 속성

정의

지정된 도구 설명 텍스트가 있는 컨트롤 위에 포인터가 고정되었을 때 도구 설명이 표시되는 시간을 가져오거나 설정합니다.

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

속성 값

Int32

포인터가 컨트롤 위에 고정되었을 때 ToolTip이 표시되는 시간(밀리초)입니다. 기본값은 5000입니다.

예제

다음 코드 예제에서는 클래스의 인스턴스를 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

설명

AutoPopDelay 속성을 사용하면 포인터가 컨트롤에 있을 때 창이 ToolTip 표시되는 시간을 줄이거나 늘릴 수 있습니다. 예를 들어 도구 설명 창에 광범위한 도움말을 표시하는 경우 이 속성의 값을 늘려 사용자가 텍스트를 읽을 충분한 시간을 확보할 수 있습니다.

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

팝업을 지연할 수 있는 최대 시간은 5000밀리초입니다. 더 긴 기간 동안 도구 설명이 Show 표시되는 정확한 순간을 제어하려면 이 메서드를 사용합니다.

적용 대상

추가 정보