次の方法で共有


FileNameEditor クラス

ファイル名を選択するためのユーザー インターフェイスを提供します。

この型のすべてのメンバの一覧については、FileNameEditor メンバ を参照してください。

System.Object
   System.Drawing.Design.UITypeEditor
      System.Windows.Forms.Design.FileNameEditor

Public Class FileNameEditor
   Inherits UITypeEditor
[C#]
public class FileNameEditor : UITypeEditor
[C++]
public __gc class FileNameEditor : public UITypeEditor
[JScript]
public class FileNameEditor extends UITypeEditor

スレッドセーフ

この型の public static (Visual Basicでは Shared) のすべてのメンバは、マルチスレッド操作で安全に使用できます。インスタンスのメンバの場合は、スレッドセーフであるとは限りません。

解説

FileNameEditor は、ファイル名を選択および編集するためのファイル選択ダイアログ ボックスを提供します。

継承時の注意: このクラスから継承して、ダイアログ ボックス用の独自のタイトルおよび独自のファイル リスト フィルタ拡張機能を提供できます。

使用例

[Visual Basic, C#, C++] EditorAttribute を使用して、 System.Drawing.FileNameEditor をプロパティと関連付けるコード例を次に示します。

 
<EditorAttribute(GetType(System.Windows.Forms.Design.FileNameEditor), GetType(System.Drawing.Design.UITypeEditor))>  _
Public Property testFilename() As String
   Get
      Return filename
   End Get
   Set
      filename = value
   End Set
End Property
Private filename As String   

[C#] 
[EditorAttribute(typeof(System.Windows.Forms.Design.FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
public string testFilename
{
    get
    {
        return filename;
    }
    set
    {
        filename = value;
    }
}
private string filename;       

[C++] 
public:
    [EditorAttribute(__typeof(System::Windows::Forms::Design::FileNameEditor), 
        __typeof(System::Drawing::Design::UITypeEditor))]
    __property String* get_testFilename() {
        return filename;
    }
    [EditorAttribute(__typeof(System::Windows::Forms::Design::FileNameEditor), 
        __typeof(System::Drawing::Design::UITypeEditor))]
    __property void set_testFilename(String* value) {
        filename = value;
    }
private:
    String*  filename;

[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

必要条件

名前空間: System.Windows.Forms.Design

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

アセンブリ: System.Design (System.Design.dll 内)

参照

FileNameEditor メンバ | System.Windows.Forms.Design 名前空間