次の方法で共有


FontEditor クラス

Font オブジェクトを選択および設定するためのユーザー インターフェイスを提供します。

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

System.Object
   System.Drawing.Design.UITypeEditor
      System.Drawing.Design.FontEditor

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

スレッドセーフ

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

解説

FontEditor は、利用可能なフォントの一覧から Font の選択や設定を行うユーザー インターフェイスを提供する UITypeEditor です。

使用例

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

 
<EditorAttribute(GetType(System.Drawing.Design.FontEditor), GetType(System.Drawing.Design.UITypeEditor))>  _
Public Property testFont() As Font
   Get
      Return font
   End Get
   Set
      font = value
   End Set
End Property
Private font As Font

[C#] 
[EditorAttribute(typeof(System.Drawing.Design.FontEditor), typeof(System.Drawing.Design.UITypeEditor))]
public Font testFont
{
    get
    {
        return font;
    }
    set
    {
        font = value;
    }
}
private Font font;

[C++] 
public:
    [EditorAttribute(__typeof(System::Drawing::Design::FontEditor),
        __typeof(System::Drawing::Design::UITypeEditor))]
    __property System::Drawing::Font* get_testFont() {
        return font;
    }
    [EditorAttribute(__typeof(System::Drawing::Design::FontEditor),
        __typeof(System::Drawing::Design::UITypeEditor))]
    __property void set_testFont(System::Drawing::Font* value) {
        font = value;
    }
private:
    Font*  font;

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

必要条件

名前空間: System.Drawing.Design

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

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

参照

FontEditor メンバ | System.Drawing.Design 名前空間 | UITypeEditor