Share via


ToolTip.ShowAlways Özellik

Tanım

Üst denetimi etkin olmasa bile Bir Araç İpucu penceresinin görüntülenip görüntülenmeyeceğini belirten bir değer alır veya ayarlar.

public:
 property bool ShowAlways { bool get(); void set(bool value); };
public bool ShowAlways { get; set; }
member this.ShowAlways : bool with get, set
Public Property ShowAlways As Boolean

Özellik Değeri

true Araç İpucu her zaman görüntüleniyorsa; aksi takdirde , false. Varsayılan değer: false.

Örnekler

Aşağıdaki kod örneği sınıfının bir örneğini ToolTip oluşturur ve örneği, örneğin içinde oluşturulduğu örnekle Form ilişkilendirir. Kod daha sonra , InitialDelayve ReshowDelaygecikme özelliklerini AutoPopDelaybaşlatır. Ayrıca sınıfı örneği, formun ToolTip etkin olup olmadığına bakılmaksızın ToolTip metninin görüntülenmesini etkinleştirmek için özelliğini true olarak ayarlarShowAlways. Son olarak, örnek ToolTip metnini formdaki iki denetimle ilişkilendirir: a Button ve CheckBox. Kod örneği, örnekte tanımlanan yöntemin adlı bir denetimi ve adlı button1checkBox1bir Button denetimi içeren bir CheckBox içinde Form yer aldığını ve yönteminin Formoluşturucusundan çağrıldığını gerektirir.

// 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

Açıklamalar

özelliğiyle ShowAlways , kapsayıcısı ToolTip etkin olmasa bile bir ToolTip penceresi görüntüleyebilirsiniz. Bu özelliği, etkin olan modsuz pencereye bakılmaksızın ToolTip pencerelerinin görüntülenmesini sağlamak için, modeless window uygulamasında kullanabilirsiniz. Bu özellik, içinde ToolTip pencerelerini görüntüleyen bir dizi denetim içeren kullanarak bir denetim UserControloluşturmak istediğinizde de kullanışlıdır. UserControl çoğu zaman formdaki etkin pencere olmadığından, bu özelliğin olarak true ayarlanması içindeki UserControl denetimlerin herhangi bir zamanda Araç İpucu pencerelerini görüntülemesini sağlar.

Şunlara uygulanır

Ayrıca bkz.