ToolTip.InitialDelay Özellik

Tanım

Araç İpucu görüntülenmeden önce geçen süreyi alır veya ayarlar.

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

Özellik Değeri

Int32

Araç İpucu penceresi görüntülenmeden önce işaretçinin denetimde sabit kalması gereken milisaniye cinsinden süre.

Ö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ı button1 checkBox1, 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ğiyle InitialDelay , Araç İpucu penceresini görüntülemeden önce bekleme süresini ToolTip kısaltabilir veya uzatabilirsiniz. Özelliğin InitialDelay değeri, süresi çok uzun olan bir değere ayarlanırsa, uygulamanızın kullanıcısı uygulamanızın ToolTip Yardımı sağladığını bilmiyor olabilir. Belirtilen süreyi kısaltarak kullanıcının hızlı bir şekilde Araç İpuçlarını görüntülediğinden emin olmak için bu özelliği kullanabilirsiniz.

Bu özelliğin değeri 32767'yi aşamaz.

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 saat değerine göre başlangıç değerlerine ayarlarAutoPopDelay. AutomaticDelay Özellik her ayarlandığında özelliği özelliğiyle InitialDelay aynı değere AutomaticDelay ayarlanır. AutomaticDelay Özellik ayarlandıktan sonra, varsayılan değeri geçersiz kılarak özelliği bağımsız olarak ayarlayabilirsinizInitialDelay.

Şunlara uygulanır

Ayrıca bkz.