Share via


ToolTip.AutoPopDelay Özellik

Tanım

İşaretçi, belirtilen Araç İpucu metnine sahip bir denetimde sabitse Araç İpucu'nun görünür durumda kalacağı süreyi alır veya ayarlar.

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

Özellik Değeri

İşaretçi bir denetim üzerinde sabit olduğunda görünür durumda kalan milisaniye ToolTip cinsinden süre. Varsayılan değer 5000'dir.

Örnekler

Aşağıdaki kod örneği sınıfının bir örneğini ToolTip oluşturur ve örneği, örneğin oluşturulduğu örnekle Form ilişkilendirir. Kod daha sonra , InitialDelayve ReshowDelaygecikme özelliklerini AutoPopDelaybaşlatır. Sınıfın örneği ek olarak, formun ToolTip etkin olup olmamasına bakılmaksızın ToolTip metninin görüntülenmesini sağlamak için özelliğini true olarak ayarlarShowAlways. Son olarak, örnek ToolTip metnini formdaki iki denetimle ilişkilendirir: a Button ve CheckBox. Kod örneği, örnekte tanımlanan yöntemin adlı bir denetimi ve adlı button1checkBox1, bir Button denetimi içeren bir CheckBox içinde Form bulunması ve yönteminin oluşturucusundan çağrılmış Formolmasını gerektirir.

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

Açıklamalar

özelliği, AutoPopDelay işaretçi bir denetim üzerindeyken pencerenin görüntülenme süresini ToolTip kısaltmanıza veya uzatmanıza olanak tanır. Örneğin, bir Araç İpucu penceresinde kapsamlı Yardım görüntülerseniz, kullanıcının metni okumak için yeterli zamanı olduğundan emin olmak için bu özelliğin değerini artırabilirsiniz.

ToolTip pencereleriniz için tutarlı bir gecikme düzenine sahip olmak istiyorsanız özelliğini ayarlayabilirsiniz AutomaticDelay . AutomaticDelay özelliği, , ReshowDelayve InitialDelay özelliklerini tek bir değere göre ilk değerlere ayarlarAutoPopDelay. AutomaticDelay Özellik her ayarlandığında özellik, AutoPopDelay özellik değerinin AutomaticDelay 10 katı olarak ayarlanır. AutomaticDelay Özellik ayarlandıktan sonra, varsayılan değeri geçersiz kılarak özelliği bağımsız olarak ayarlayabilirsinizAutoPopDelay.

Bir açılır pencere için geciktirebileceğiniz en uzun süre 5000 milisaniyedir. Daha uzun süreler için, ToolTip'in görüntülendiği tam anı denetlemek için yöntemini kullanın Show .

Şunlara uygulanır

Ayrıca bkz.