ToolTip.InitialDelay 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
도구 설명이 표시되기까지 경과하는 시간을 가져오거나 설정합니다.
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
속성 값
도구 설명 창이 표시되기 전에 포인터가 컨트롤에 고정된 상태로 유지되어야 하는 시간(밀리초)입니다.
예제
다음 코드 예제에서는 클래스의 인스턴스를 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
설명
이 InitialDelay 속성을 사용하면 도구 설명 창을 표시하기 전에 대기하는 시간을 ToolTip 줄이거나 늘릴 수 있습니다. 속성 값 InitialDelay 이 너무 긴 기간의 값으로 설정된 경우 애플리케이션 사용자가 애플리케이션에서 ToolTip 도움말을 제공한다는 사실을 알지 못할 수 있습니다. 이 속성을 사용하여 지정된 시간을 단축하여 사용자에게 도구 설명이 빠르게 표시되도록 할 수 있습니다.
이 속성의 값은 32767을 초과할 수 없습니다.
도구 설명 창에 대해 일관된 지연 패턴을 사용하려면 속성을 설정할 AutomaticDelay 수 있습니다. 이 속성은 AutomaticDelay 단일 시간 값에 따라 , ReshowDelay및 InitialDelay 속성을 초기 값으로 설정합니다AutoPopDelay. 속성을 설정할 InitialDelay 때마다 AutomaticDelay 속성은 속성과 동일한 값으로 AutomaticDelay 설정됩니다. 속성이 AutomaticDelay 설정되면 속성을 독립적으로 설정 InitialDelay 하여 기본값을 재정의할 수 있습니다.