다음을 통해 공유


ToolTip.AutoPopDelay 속성

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

네임스페이스: System.Windows.Forms
어셈블리: System.Windows.Forms(system.windows.forms.dll)

구문

‘선언
Public Property AutoPopDelay As Integer
‘사용 방법
Dim instance As ToolTip
Dim value As Integer

value = instance.AutoPopDelay

instance.AutoPopDelay = value
public int AutoPopDelay { get; set; }
public:
property int AutoPopDelay {
    int get ();
    void set (int value);
}
/** @property */
public int get_AutoPopDelay ()

/** @property */
public void set_AutoPopDelay (int value)
public function get AutoPopDelay () : int

public function set AutoPopDelay (value : int)

속성 값

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

설명

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

도구 설명 창에 대해 일관된 지연 패턴을 사용하려면 AutomaticDelay 속성을 설정합니다. AutomaticDelay 속성은 AutoPopDelay, ReshowDelayInitialDelay 속성을 하나의 초기 값으로 설정합니다. AutomaticDelay 속성을 설정할 때마다 AutoPopDelay 속성은 AutomaticDelay 속성 값의 10배로 설정됩니다. AutomaticDelay 속성을 설정한 다음에는 AutoPopDelay 속성을 별도로 설정하여 기본값을 재정의할 수 있습니다.

팝업은 5000 밀리초까지 지연시킬 수 있습니다. 지연 시간을 더 길게 설정하려면 Show 메서드를 사용하여 도구 설명이 표시되는 시점을 정확하게 제어할 수 있습니다.

예제

다음 코드 예제에서는 ToolTip 클래스의 인스턴스를 만든 다음 이 인스턴스가 만들어진 Form과 연결합니다. 그런 다음 지연 속성(AutoPopDelay, InitialDelayReshowDelay)을 초기화합니다 또한 ToolTip 클래스의 인스턴스는 ShowAlways 속성을 true로 설정하여 해당 폼의 활성화 여부에 관계없이 도구 설명 텍스트가 항상 표시되도록 합니다. 마지막으로 이 예제에서는 도구 설명 텍스트를 폼에 있는 두 개의 컨트롤(ButtonCheckBox)과 연결합니다. 이 코드 예제를 실행하려면 예제에 정의된 메서드가 button1(Button 컨트롤)과 checkBox1,(CheckBox 컨트롤)이 포함된 Form 안에 있고 Form의 생성자에서 호출되어야 합니다.

' 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
// 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.
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.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

플랫폼

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

2.0, 1.1, 1.0에서 지원

참고 항목

참조

ToolTip 클래스
ToolTip 멤버
System.Windows.Forms 네임스페이스
ToolTip.AutomaticDelay 속성
InitialDelay
ReshowDelay
UseFading
Popup