ToolTip.ReshowDelay Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient ou définit la durée qui doit se produire avant que les fenêtres d’info-bulle suivantes s’affichent lorsque le pointeur passe d’un contrôle à un autre.
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
Valeur de propriété
Durée, en millisecondes, d’affichage des fenêtres info-bulle suivantes.
Exemples
L’exemple de code suivant crée une instance de la ToolTip classe et associe l’instance à celle Form dans laquelle l’instance est créée. Le code initialise ensuite les propriétés AutoPopDelayde délai, InitialDelayet ReshowDelay. En outre, l’instance de la ToolTip classe définit la ShowAlways propriété pour permettre au true texte Info-bulle d’être affiché, que le formulaire soit actif ou non. Enfin, l’exemple associe du texte info-bulle à deux contrôles sur un formulaire, un Button et un CheckBox. L’exemple de code nécessite que la méthode définie dans l’exemple se trouve dans un Form contrôle qui contient un Button contrôle nommé button1 et un CheckBox contrôle nommé checkBox1, et que la méthode est appelée à partir du constructeur du 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
Remarques
Avec la ReshowDelay propriété, vous pouvez raccourcir ou allonger le temps d’attente ToolTip avant d’afficher une fenêtre Info-bulle après l’affichage d’une fenêtre Info-bulle précédente. La première fois qu’une fenêtre Info-bulle est affichée, la valeur de la InitialDelay propriété est utilisée pour déterminer le délai à appliquer avant d’afficher initialement la fenêtre Info-bulle. Lorsqu’une fenêtre Info-bulle est actuellement affichée et que l’utilisateur déplace le pointeur vers un autre contrôle qui affiche une fenêtre Info-bulle, la valeur de la ReshowDelay propriété est utilisée avant d’afficher l’info-bulle pour le nouveau contrôle. La fenêtre Info-bulle du contrôle précédent doit toujours être affichée pour que le délai spécifié dans la ReshowDelay propriété soit utilisé ; sinon, la valeur de la InitialDelay propriété est utilisée.
Si vous souhaitez avoir un modèle de délai cohérent pour les fenêtres Info-bulle, vous pouvez définir la AutomaticDelay propriété. La AutomaticDelay propriété définit les AutoPopDelayvaleurs initiales , ReshowDelayet InitialDelay les propriétés en fonction d’une valeur de temps unique. Chaque fois que la AutomaticDelay propriété est définie, la ReshowDelay propriété est définie sur 1/5 de la valeur de la AutomaticDelay propriété. Une fois la AutomaticDelay propriété définie, vous pouvez définir la ReshowDelay propriété indépendamment, en remplaçant la valeur par défaut.