ToolTip.InitialDelay Tulajdonság
Definíció
Fontos
Egyes információk olyan, kiadás előtti termékekre vonatkoznak, amelyek a kiadásig még jelentősen módosulhatnak. A Microsoft nem vállal kifejezett vagy törvényi garanciát az itt megjelenő információért.
Lekéri vagy beállítja az elemleírás megjelenése előtt eltelt időt.
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
Tulajdonság értéke
Az az időtartam ezredmásodpercben, amikor az egérmutatónak az Elemleírás ablak megjelenítése előtt állónak kell maradnia egy vezérlőn.
Példák
Az alábbi példakód létrehozza az ToolTip osztály egy példányát, és társítja a példányt azzal, Form amelyikben a példány létrejön. A kód ezután inicializálja a késleltetési tulajdonságokat AutoPopDelay, InitialDelayés ReshowDelay. Emellett az osztály példánya úgy állítja be a ToolTipShowAlways tulajdonságot, hogy true engedélyezze az elemleírás szövegének megjelenítését, függetlenül attól, hogy az űrlap aktív-e. Végül a példa az Elemleírás szöveget két vezérlőelemmel társítja egy űrlapon, az a Button és a CheckBox. A példakód megköveteli, hogy a példában definiált metódus egy FormButton elnevezett button1 vezérlőelemet és egy CheckBox elnevezett checkBox1, vezérlőelemet tartalmaz, és hogy a metódus a konstruktortól Formlegyen meghívva.
// 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
Megjegyzések
InitialDelay A tulajdonsággal lerövidítheti vagy meghosszabbíthatja a várakozási időt, mielőtt megjelenítené az ToolTip Elemleírás ablakot. Ha a InitialDelay tulajdonság értéke túl hosszú időtartamú értékre van állítva, előfordulhat, hogy az alkalmazás felhasználója nem tudja, hogy az alkalmazás elemleírás-súgót nyújt. Ezzel a tulajdonságtal gondoskodhat arról, hogy a felhasználó gyorsan megjelenítse az elemleírásokat a megadott idő lerövidítésével.
A tulajdonság értéke nem haladhatja meg a 32767-et.
Ha konzisztens késleltetési mintát szeretne használni az elemleírás ablakaihoz, beállíthatja a tulajdonságot AutomaticDelay . A AutomaticDelay tulajdonság a , AutoPopDelayés ReshowDelay a InitialDelaytulajdonságokat kezdeti értékekre állítja egyetlen időérték alapján. A tulajdonság minden beállításakor AutomaticDelay a InitialDelay tulajdonság értéke megegyezik a tulajdonság értékével AutomaticDelay . Ha a AutomaticDelay tulajdonság be van állítva, egymástól függetlenül is beállíthatja a InitialDelay tulajdonságot, felülírva az alapértelmezett értéket.