ToolTip.AutoPopDelay 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
지정한 도구 설명 텍스트가 있는 컨트롤에 포인터가 고정되어 있는 경우 도구 설명이 표시되는 기간을 가져오거나 설정합니다.
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
속성 값
포인터가 컨트롤에 고정되어 있을 ToolTip 때 표시되는 기간(밀리초)입니다. Windows 11에서는 기본값으로 인해 도구 설명이 무기한으로 표시됩니다.
예제
다음 코드 예제에서는 클래스의 인스턴스를 ToolTip 만들고 인스턴스가 만들어진 인스턴스와 Form 연결합니다. 그런 다음, 이 코드는 지연 속성 AutoPopDelay및 InitialDelayReshowDelay. 또한 클래스의 인스턴스는 폼이 ToolTip 활성 상태인지 여부에 관계없이 도구 설명 텍스트를 표시할 수 있도록 속성을 true 설정합니다ShowAlways. 마지막으로, 이 예제에서는 도구 설명 텍스트를 폼의 컨트롤 2개와 a 및 a Button 와 연결합니다 CheckBox. 이 코드 예제에서는 예제에 정의된 메서드가 명명된 컨트롤과 CheckBox 명명 checkBox1,button1 된 컨트롤을 포함하고 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따라 초기 값으로 , ReshowDelay및 InitialDelay 속성을 설정합니다. 속성을 설정할 AutoPopDelay 때마다 AutomaticDelay 속성은 속성 값의 AutomaticDelay 10배로 설정됩니다. 속성이 AutomaticDelay 설정되면 속성을 독립적으로 설정 AutoPopDelay 하여 기본값을 재정의할 수 있습니다.
이 속성의 동작은 Windows 버전에 따라 다릅니다.
- Windows 10에서 팝업을 지연할 수 있는 최대 시간은 5000밀리초입니다. 5000ms보다 큰 값은 5000ms로 고정됩니다.
- Windows 11에서는 기본값으로 인해 도구 설명이 무기한으로 표시됩니다. 사용자 지정 값으로 설정하면 5,000ms 제한이 없으며 지정된 기간 동안 도구 설명이 표시됩니다.
도구 설명이 표시되는 기간을 연장하거나 정확한 제어를 위해 메서드를 Show 사용합니다.