RadioButtonRenderer.GetGlyphSize メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > RadioButtonRenderer.GetGlyphSize メソッドの意味・解説 

RadioButtonRenderer.GetGlyphSize メソッド

メモ : このメソッドは、.NET Framework version 2.0新しく追加されたものです。

オプション ボタングリフサイズピクセル単位返します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Public Shared Function GetGlyphSize
 ( _
    g As Graphics, _
    state As RadioButtonState _
) As Size
Dim g As Graphics
Dim state As RadioButtonState
Dim returnValue As Size

returnValue = RadioButtonRenderer.GetGlyphSize(g, state)
public static Size GetGlyphSize (
    Graphics g,
    RadioButtonState state
)
public:
static Size GetGlyphSize (
    Graphics^ g, 
    RadioButtonState state
)
public static Size GetGlyphSize (
    Graphics g, 
    RadioButtonState state
)
public static function GetGlyphSize
 (
    g : Graphics, 
    state : RadioButtonState
) : Size

パラメータ

g

オプション ボタン描画使用する Graphics

state

オプション ボタンビジュアル状態を指定する RadioButtonState 値の 1 つ

戻り値
オプション ボタングリフサイズピクセル単位で表す Size

解説解説
使用例使用例

GetGlyphSize メソッド使用してオプション ボタン テキスト境界判断するコード例次に示します。このコード例は、RadioButtonRenderer クラストピック取り上げているコード例一部分です。

' Define the text bounds so that the text rectangle 
' does not include the radio button.
Public ReadOnly Property
 TextRectangle() As Rectangle
    Get
        Using g As Graphics = Me.CreateGraphics()
            With textRectangleValue
                .X = Me.ClientRectangle.X + _
                    RadioButtonRenderer.GetGlyphSize(g, _
                    RadioButtonState.UncheckedNormal).Width
                .Y = Me.ClientRectangle.Y
                .Width = Me.ClientRectangle.Width - _
                    RadioButtonRenderer.GetGlyphSize(g, _
                    RadioButtonState.UncheckedNormal).Width
                .Height = Me.ClientRectangle.Height
            End With
        End Using
        Return textRectangleValue
    End Get
End Property
// Define the text bounds so that the text rectangle 
// does not include the radio button.
public Rectangle TextRectangle
{
    get
    {
        using (Graphics g = this.CreateGraphics())
        {
            textRectangleValue.X = ClientRectangle.X +
                RadioButtonRenderer.GetGlyphSize(g,
                RadioButtonState.UncheckedNormal).Width;
            textRectangleValue.Y = ClientRectangle.Y;
            textRectangleValue.Width = ClientRectangle.Width -
                RadioButtonRenderer.GetGlyphSize(g,
                RadioButtonState.UncheckedNormal).Width;
            textRectangleValue.Height = ClientRectangle.Height;
        }

        return textRectangleValue;
    }
}
    // Define the text bounds so that the text rectangle
    // does not include the radio button.
public:
    property Rectangle TextRectangle
    {
        Rectangle get()
        {
            Graphics^ g = this->CreateGraphics();

            textRectangleValue.X = ClientRectangle.X +
                RadioButtonRenderer::GetGlyphSize(g,
                RadioButtonState::UncheckedNormal).Width;
            textRectangleValue.Y = ClientRectangle.Y;
            textRectangleValue.Width = ClientRectangle.Width -
                RadioButtonRenderer::GetGlyphSize(g,
                RadioButtonState::UncheckedNormal).Width;
            textRectangleValue.Height = ClientRectangle.Height;
         
            delete g;                

            return textRectangleValue;
        }
    }
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
RadioButtonRenderer クラス
RadioButtonRenderer メンバ
System.Windows.Forms 名前空間



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

辞書ショートカット

すべての辞書の索引

「RadioButtonRenderer.GetGlyphSize メソッド」の関連用語

RadioButtonRenderer.GetGlyphSize メソッドのお隣キーワード
検索ランキング

   

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



RadioButtonRenderer.GetGlyphSize メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS