ToolTip.ReshowDelay 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 lamanya waktu yang harus ditranspirasi sebelum jendela TipsAlat berikutnya muncul saat penunjuk berpindah dari satu kontrol ke kontrol lainnya.
public:
property int ReshowDelay { int get(); void set(int value); };
public int ReshowDelay { get; set; }
member this.ReshowDelay : int with get, set
Public Property ReshowDelay As Integer
Nilai Properti
Lamanya waktu, dalam milidetik, bahwa dibutuhkan jendela TipsAlat berikutnya untuk muncul.
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
ReshowDelay Dengan properti , Anda dapat mempersingkat atau memperpanjang waktu ToolTip tunggu sebelum menampilkan jendela TipsAlat setelah jendela TipsAlat sebelumnya ditampilkan. Pertama kali jendela TipsAlat ditampilkan, nilai InitialDelay properti digunakan untuk menentukan penundaan yang akan diterapkan sebelum awalnya memperlihatkan jendela TipsAlat. Saat jendela TipsAlat saat ini ditampilkan dan pengguna memindahkan penunjuk ke kontrol lain yang menampilkan jendela TipsAlat, nilai ReshowDelay properti digunakan sebelum menampilkan TipsAlat untuk kontrol baru. Jendela TipsAlat dari kontrol sebelumnya masih harus ditampilkan agar penundaan yang ditentukan dalam ReshowDelay properti akan digunakan; jika tidak InitialDelay , nilai properti digunakan.
Jika Anda ingin memiliki pola penundaan yang konsisten untuk jendela TipsAlat AutomaticDelay , Anda dapat mengatur properti . Properti AutomaticDelay mengatur AutoPopDelayproperti , ReshowDelay, dan InitialDelay ke nilai awal berdasarkan nilai waktu tunggal. Setiap kali AutomaticDelay properti diatur, ReshowDelay properti diatur ke 1/5 dari AutomaticDelay nilai properti. AutomaticDelay Setelah properti diatur, Anda dapat mengatur ReshowDelay properti secara independen, mengesampingkan nilai default.