font-styleとは? わかりやすく解説

Font.Style プロパティ

この Fontスタイル情報取得します

名前空間: System.Drawing
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Dim instance As Font
Dim value As FontStyle

value = instance.Style
public FontStyle Style { get; }
public:
property FontStyle Style {
    FontStyle get ();
}
/** @property */
public FontStyle get_Style ()

プロパティ
この Fontスタイル情報格納されている FontStyle 列挙体。

使用例使用例

FontStyle 列挙体を使用してボタンFont プロパティ新し太字フォント設定する方法次のコード例示します。この例は、Windows フォームでの使用意図してデザインされています。Button1 という名前のボタンを含むフォーム作成し、このフォーム次のコード貼り付けます。ボタンClick イベントButton1_Click メソッド関連付けます。

 Private Sub Button1_Click(ByVal
 sender As System.Object, _
    ByVal e As System.EventArgs) Handles
 Button1.Click
    If Not Button1.Font.Style = FontStyle.Bold
 Then
        Button1.Font = New Font(FontFamily.GenericSansSerif, _
            12.0F, FontStyle.Bold)
    End If
End Sub
private void Button1_Click(System.Object sender,
 System.EventArgs e)
{
    if (Button1.Font.Style != FontStyle.Bold)
            Button1.Font = new Font(FontFamily.GenericSansSerif
,
            12.0F, FontStyle.Bold);
}
private:
   void Button1_Click( System::Object^ /*sender*/, System::EventArgs^
 /*e*/ )
   {
      Button1->Font = gcnew System::Drawing::Font( FontFamily::GenericSansSerif,12.0F,FontStyle::Bold
 );
   }
private void button1_Click(Object sender, System.EventArgs
 e)
{
    button1.set_Font(new Font(FontFamily.get_GenericSansSerif(),
 12,
        FontStyle.Bold));
} //button1_Click
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

FontStyle 列挙体

テキスト適用するスタイル情報指定します

この列挙体には、メンバ値のビットごとの組み合わせ可能にする FlagsAttribute 属性含まれています。

名前空間: System.Drawing
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

<FlagsAttribute> _
Public Enumeration FontStyle
[FlagsAttribute] 
public enum FontStyle
[FlagsAttribute] 
public enum class FontStyle
/** @attribute FlagsAttribute() */ 
public enum FontStyle
FlagsAttribute 
public enum FontStyle
メンバメンバ
使用例使用例

FontStyle 列挙体を使用してボタンFont プロパティ新し太字スタイル フォント設定する方法次のコード例示します。この例は、Windows フォームでの使用意図してデザインされています。Button1 という名前のボタン含んだフォーム作成し、このフォーム次のコード貼り付けます。ボタンClick イベントButton1_Click メソッド関連付けます。

 Private Sub Button1_Click(ByVal
 sender As System.Object, _
    ByVal e As System.EventArgs) Handles
 Button1.Click
    If Not Button1.Font.Style = FontStyle.Bold
 Then
        Button1.Font = New Font(FontFamily.GenericSansSerif, _
            12.0F, FontStyle.Bold)
    End If
End Sub
private void Button1_Click(System.Object sender,
 System.EventArgs e)
{
    if (Button1.Font.Style != FontStyle.Bold)
            Button1.Font = new Font(FontFamily.GenericSansSerif
,
            12.0F, FontStyle.Bold);
}
private:
   void Button1_Click( System::Object^ /*sender*/, System::EventArgs^
 /*e*/ )
   {
      Button1->Font = gcnew System::Drawing::Font( FontFamily::GenericSansSerif,12.0F,FontStyle::Bold
 );
   }
private void button1_Click(Object sender, System.EventArgs
 e)
{
    button1.set_Font(new Font(FontFamily.get_GenericSansSerif(),
 12,
        FontStyle.Bold));
} //button1_Click
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「font-style」の関連用語

font-styleのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



font-styleのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS