FileDialog.Title 속성

정의

파일 대화 상자 제목을 가져오거나 설정합니다.

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

속성 값

String

파일 대화 상자 제목입니다. 기본값은 빈 문자열("")입니다.

예제

다음 코드 예제에서는 초기화 OpenFileDialog, 설정 Title 및 속성 및 Filter 사용자가 속성을 true로 설정 OpenFileDialog.Multiselect 하 여 여러 파일을 선택할 수 있도록 보여 줍니다. 이 예제를 실행하려면 다음 코드를 명명 OpenFileDialog1Button 이름과 이름이 fileButton포함된 양식에 OpenFileDialog 붙여넣습니다. 호출 된 InitializeOpenFileDialog 폼의 생성자 또는 Load 메서드. 또한 이 예제에서는 Click 컨트롤의 Button 이벤트가 예제에 정의된 이벤트 처리기에 연결되어야 합니다.

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

설명

문자열은 대화 상자의 제목 표시줄에 배치됩니다. 타이틀이 빈 문자열인 경우 시스템은 기본 제목("다른 이름으로 저장" 또는 "열기")을 사용합니다.

적용 대상