ToolTip.ReshowDelay Vlastnost

Definice

Získá nebo nastaví dobu, která se musí převést před následnými okny popisku, jak se ukazatel pohybuje od jednoho ovládacího prvku k druhému.

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

Hodnota vlastnosti

Int32

Doba v milisekundách, po kterou se zobrazí následná okna popisů.

Příklady

Následující příklad kódu vytvoří instanci ToolTip třídy a přidruží instanci k Form instanci, ve které je instance vytvořena. Kód pak inicializuje vlastnosti AutoPopDelayzpoždění , InitialDelaya ReshowDelay. Kromě instance ToolTip třídy nastaví ShowAlways vlastnost povolit true ToolTip text zobrazit bez ohledu na to, zda formulář je aktivní. Nakonec příklad přidruží text popisku k dvěma ovládacím prvkům ve formuláři, Button a a .CheckBox Příklad kódu vyžaduje, aby metoda definovaná v příkladu se nachází v Form rámci, který obsahuje Button ovládací prvek pojmenovaný button1 a pojmenovaný CheckBox checkBox1, ovládací prvek a že metoda je volána z konstruktoru 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

Poznámky

ReshowDelay U vlastnosti můžete zkrátit nebo prodloužit dobu ToolTip čekání před zobrazením okna Popis po zobrazení předchozího okna popisku. Při prvním zobrazení okna popisku se hodnota InitialDelay vlastnosti používá k určení zpoždění, které se má použít před počátečním zobrazením okna Popis. Když se právě zobrazuje okno Popis tlačítka a uživatel přesune ukazatel na jiný ovládací prvek, který zobrazí okno Popis, hodnota ReshowDelay vlastnosti se použije před zobrazením popisu pro nový ovládací prvek. Okno Popis tlačítka z předchozího ovládacího prvku musí být stále zobrazeno, aby se zpoždění zadané ve ReshowDelay vlastnosti použilo. V opačném případě InitialDelay se použije hodnota vlastnosti.

Pokud chcete mít konzistentní vzor zpoždění pro okna popisů tlačítek, můžete vlastnost nastavit AutomaticDelay . Vlastnost AutomaticDelay nastaví AutoPopDelayhodnotu , ReshowDelaya InitialDelay vlastnosti na počáteční hodnoty na základě jedné časové hodnoty. Při každém AutomaticDelay nastavení ReshowDelay vlastnosti je vlastnost nastavena na hodnotu vlastnosti 1/5 AutomaticDelay . AutomaticDelay Jakmile je vlastnost nastavena, můžete vlastnost nezávisle nastavit ReshowDelay a přepíše výchozí hodnotu.

Platí pro

Viz také