ProgressBarRenderer.ChunkSpaceThickness プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ProgressBarRenderer.ChunkSpaceThickness プロパティの意味・解説 

ProgressBarRenderer.ChunkSpaceThickness プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

プログレス バー内部要素どうしの間隔の幅をピクセル単位取得します

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

Public Shared ReadOnly Property
 ChunkSpaceThickness As Integer
Dim value As Integer

value = ProgressBarRenderer.ChunkSpaceThickness
public static int ChunkSpaceThickness
 { get; }
public:
static property int ChunkSpaceThickness {
    int get ();
}
/** @property */
public static int get_ChunkSpaceThickness
 ()
public static function get
 ChunkSpaceThickness () : int

プロパティ
プログレス バー内部要素どうしの間隔の幅 (ピクセル単位)。

例外例外
解説解説
使用例使用例

ChunkSpaceThickness プロパティ使用して、DrawVerticalChunks メソッドによって描画されるプログレス バー増分を表す各四角形サイズ決定するコード例次に示します。このコード例は、ProgressBarRenderer クラストピック取り上げているコード例一部分です。

' Initialize the rectangles used to paint the states of the 
' progress bar.
Private Sub SetupProgressBar() 
    If Not ProgressBarRenderer.IsSupported
 Then
        Return
    End If
    
    ' Determine the size of the progress bar frame.
    Me.Size = New Size(ClientRectangle.Width,
 NumberChunks *(ProgressBarRenderer.ChunkThickness + 2 * ProgressBarRenderer.ChunkSpaceThickness)
 + 6)
    
    ' Initialize the rectangles to draw each step of the 
    ' progress bar.
    progressBarRectangles = New Rectangle(NumberChunks) {}
    
    Dim i As Integer
    For i = 0 To NumberChunks
        ' Use the thickness defined by the current visual style 
        ' to calculate the height of each rectangle. The size 
        ' adjustments ensure that the chunks do not paint over 
        ' the frame.
        Dim filledRectangleHeight As Integer
 = (i + 1)  _
    *(ProgressBarRenderer.ChunkThickness + 2 * ProgressBarRenderer.ChunkSpaceThickness)
        
        progressBarRectangles(i) = New Rectangle(ClientRectangle.X
 + 3, _
            ClientRectangle.Y + ClientRectangle.Height - 3 - filledRectangleHeight,
 _
            ClientRectangle.Width - 6, filledRectangleHeight)
    Next i

End Sub 'SetupProgressBar

// Initialize the rectangles used to paint the states of the 
// progress bar.
private void SetupProgressBar()
{
    if (!ProgressBarRenderer.IsSupported)
    {
        return;
    }

    // Determine the size of the progress bar frame.
    this.Size = new Size(ClientRectangle.Width
,
        (NumberChunks) * (ProgressBarRenderer.ChunkThickness +
        (2 * ProgressBarRenderer.ChunkSpaceThickness)) + 6);

    // Initialize the rectangles to draw each step of the 
    // progress bar.
    progressBarRectangles = new Rectangle[NumberChunks];

    for (int i = 0; i < NumberChunks; i++)
    {
        // Use the thickness defined by the current visual style 
        // to calculate the height of each rectangle. The size 
        // adjustments ensure that the chunks do not paint over 
        // the frame.

        int filledRectangleHeight =
            ((i + 1) * (ProgressBarRenderer.ChunkThickness +
            (2 * ProgressBarRenderer.ChunkSpaceThickness)));

        progressBarRectangles[i] = new Rectangle(
            ClientRectangle.X + 3,
            ClientRectangle.Y + ClientRectangle.Height - 3
            - filledRectangleHeight,
            ClientRectangle.Width - 6,
            filledRectangleHeight);
    }
}
    // Initialize the rectangles used to paint the states of the
    // progress bar.
private:
    void SetupProgressBar()
    {
        if (!ProgressBarRenderer::IsSupported)
        {
            return;
        }

        // Determine the size of the progress bar frame.
        this->Size = System::Drawing::Size(ClientRectangle.Width
,
            (NumberChunks * (ProgressBarRenderer::ChunkThickness + 
            (2 * ProgressBarRenderer::ChunkSpaceThickness))) + 6);

        // Initialize the rectangles to draw each step of the
        // progress bar.
        progressBarRectangles = gcnew array<Rectangle>(NumberChunks);

        for (int i = 0; i < NumberChunks;
 i++)
        {
            // Use the thickness defined by the current visual style
            // to calculate the height of each rectangle. The size
            // adjustments ensure that the chunks do not paint over
            // the frame.

            int filledRectangleHeight = 
                ((i + 1) * (ProgressBarRenderer::ChunkThickness +
                (2 * ProgressBarRenderer::ChunkSpaceThickness)));

            progressBarRectangles[i] = Rectangle(
                ClientRectangle.X + 3,
                ClientRectangle.Y + ClientRectangle.Height - 3
                - filledRectangleHeight,
                ClientRectangle.Width - 6,
                filledRectangleHeight);
        }
    }
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ProgressBarRenderer クラス
ProgressBarRenderer メンバ
System.Windows.Forms 名前空間


このページでは「.NET Framework クラス ライブラリ リファレンス」からProgressBarRenderer.ChunkSpaceThickness プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からProgressBarRenderer.ChunkSpaceThickness プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からProgressBarRenderer.ChunkSpaceThickness プロパティ を検索

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

辞書ショートカット

すべての辞書の索引

「ProgressBarRenderer.ChunkSpaceThickness プロパティ」の関連用語

ProgressBarRenderer.ChunkSpaceThickness プロパティのお隣キーワード
検索ランキング

   

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



ProgressBarRenderer.ChunkSpaceThickness プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS