ToolTip.AutoPopDelay プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
ツールヒント テキストが指定されたコントロール上でポインターが静止している場合に、ツールヒントが表示される時間を取得または設定します。
public:
property int AutoPopDelay { int get(); void set(int value); };
public int AutoPopDelay { get; set; }
member this.AutoPopDelay : int with get, set
Public Property AutoPopDelay As Integer
プロパティ値
コントロール上でポインターが静止している場合に、ToolTip が表示される時間 (ミリ秒単位)。 既定値は 5000 です。
例
次のコード例では、 クラスのインスタンスを ToolTip 作成し、インスタンス Form をインスタンスが作成された に関連付けます。 次に、遅延プロパティ AutoPopDelay、、 InitialDelayおよび ReshowDelayを初期化します。 さらに、 クラスのToolTipインスタンスは、 プロパティを にtrue
設定ShowAlwaysして、フォームがアクティブかどうかに関係なく、ツールヒント テキストを表示できるようにします。 最後に、ツールヒント テキストをフォーム Button の 2 つのコントロール ( と CheckBox) に関連付けます。 このコード例では、この例で定義されているメソッドが、 という名前のコントロールと CheckBox という名前button1
checkBox1,
のコントロールを含む Button 内Formにあり、 のコンストラクター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
注釈
AutoPopDelayプロパティを使用すると、ポインターがコントロール上にあるときにウィンドウが表示される時間ToolTipを短縮または延長できます。 たとえば、ツールヒント ウィンドウに広範なヘルプを表示する場合は、このプロパティの値を大きくして、ユーザーがテキストを読み取るのに十分な時間を確保できます。
ツールヒント ウィンドウに一貫した遅延パターンを設定する場合は、 プロパティを AutomaticDelay 設定できます。 プロパティはAutomaticDelay、1 つの値にAutoPopDelayReshowDelay基づいて、、、および InitialDelay の各プロパティを初期値に設定します。 プロパティが AutomaticDelay 設定されるたびに、 プロパティはプロパティ値の AutoPopDelay 10 倍に AutomaticDelay 設定されます。 プロパティが AutomaticDelay 設定されたら、プロパティを個別に設定 AutoPopDelay して、既定値をオーバーライドできます。
ポップアップを遅延できる最大時間は 5,000 ミリ秒です。 期間が長い場合は、 メソッドを Show 使用して、ツールヒントが表示される正確な瞬間を制御します。