FileDialog.Title Özellik

Tanım

Dosya iletişim kutusu başlığını alır veya ayarlar.

public:
 property System::String ^ Title { System::String ^ get(); void set(System::String ^ value); };
public string Title { get; set; }
member this.Title : string with get, set
Public Property Title As String

Özellik Değeri

String

Dosya iletişim kutusu başlığı. Varsayılan değer boş bir dizedir ("").

Örnekler

Aşağıdaki kod örneği, ve OpenFileDialogFilter özelliklerini ayarlama Title ve özelliğini true olarak ayarlayarak kullanıcının birden çok dosya seçmesine izin verme işlemini başlatmayı OpenFileDialog.Multiselect gösterir. Bu örneği çalıştırmak için, aşağıdaki kodu adlandırılmış ve adlandırılmış fileButton``OpenFileDialog1 bir öğesini içeren bir OpenFileDialog Button forma yapıştırın. Formun InitializeOpenFileDialog oluşturucusunda veya Load yönteminde yöntemini çağırın. Örnek ayrıca denetimin Click olayının Button örnekte tanımlanan olay işleyicisine bağlı olmasını gerektirir.

void InitializeOpenFileDialog()
{
   this->OpenFileDialog1 = gcnew System::Windows::Forms::OpenFileDialog;
   
   // Set the file dialog to filter for graphics files.
   this->OpenFileDialog1->Filter =
      "Images (*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|" +
      "All files (*.*)|*.*";
   
   // Allow the user to select multiple images.
   this->OpenFileDialog1->Multiselect = true;
   this->OpenFileDialog1->Title = "My Image Browser";
}

void fileButton_Click( System::Object^ sender, System::EventArgs^ e )
{
   OpenFileDialog1->ShowDialog();
}
private void InitializeOpenFileDialog()
{
    this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();

    // Set the file dialog to filter for graphics files.
    this.openFileDialog1.Filter = 
        "Images (*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|" + 
        "All files (*.*)|*.*";

    // Allow the user to select multiple images.
    this.openFileDialog1.Multiselect = true;
    this.openFileDialog1.Title = "My Image Browser";
}

private void fileButton_Click(System.Object sender, System.EventArgs e)
{
    openFileDialog1.ShowDialog();
}
Private Sub InitializeOpenFileDialog()
    Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog

    ' Set the file dialog to filter for graphics files.
    Me.OpenFileDialog1.Filter = _
    "Images (*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|All files (*.*)|*.*"

    ' Allow the user to select multiple images.
    Me.OpenFileDialog1.Multiselect = True
    Me.OpenFileDialog1.Title = "My Image Browser"
End Sub

Private Sub fileButton_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles FileButton.Click
    OpenFileDialog1.ShowDialog()
End Sub

Açıklamalar

Dize, iletişim kutusunun başlık çubuğuna yerleştirilir. Başlık boş bir dizeyse, sistem "Farklı Kaydet" veya "Aç" olan varsayılan bir başlık kullanır.

Şunlara uygulanır