ToolTip.InitialDelay Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan atau mengatur waktu yang berlalu sebelum TipsAlat muncul.
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
Nilai Properti
Periode waktu, dalam milidetik, bahwa penunjuk harus tetap stasioner pada kontrol sebelum jendela ToolTip ditampilkan.
Contoh
Contoh kode berikut membuat instans ToolTip kelas dan mengaitkan instans dengan Form instans yang dibuat di dalamnya. Kode kemudian menginisialisasi properti AutoPopDelaypenundaan , , InitialDelaydan ReshowDelay. Selain itu, instans ToolTipShowAlways kelas mengatur properti untuk true mengaktifkan teks TipsAlat yang akan ditampilkan terlepas dari apakah formulir aktif. Terakhir, contoh mengaitkan teks TipsAlat dengan dua kontrol pada formulir, Button dan CheckBox. Contoh kode mengharuskan metode yang ditentukan dalam contoh terletak di dalam Form yang berisi Button kontrol bernama button1 dan CheckBox kontrol bernama checkBox1, dan bahwa metode dipanggil dari konstruktor .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
Keterangan
InitialDelay Dengan properti , Anda dapat mempersingkat atau memperpanjang waktu ToolTip tunggu sebelum menampilkan jendela TipsAlat. Jika nilai InitialDelay properti diatur ke nilai yang terlalu panjang dalam durasi, pengguna aplikasi Anda mungkin tidak tahu bahwa aplikasi Anda menyediakan Bantuan TipsAlat. Anda dapat menggunakan properti ini untuk memastikan bahwa pengguna memiliki TipsAlat yang ditampilkan dengan cepat dengan mempersingkat waktu yang ditentukan.
Nilai untuk properti ini tidak boleh melebihi 32767.
Jika Anda ingin memiliki pola penundaan yang konsisten untuk jendela TipsAlat, Anda dapat mengatur AutomaticDelay properti . Properti AutomaticDelay mengatur AutoPopDelayproperti , ReshowDelay, dan InitialDelay ke nilai awal berdasarkan nilai waktu tunggal. Setiap kali AutomaticDelay properti diatur, InitialDelay properti diatur ke nilai yang sama dengan AutomaticDelay properti . AutomaticDelay Setelah properti diatur, Anda dapat mengatur InitialDelay properti secara independen, mengesampingkan nilai default.