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

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

DataGridViewImageColumn.ImageLayout プロパティ

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

この列のセルイメージレイアウト取得または設定します

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

Public Property ImageLayout As
 DataGridViewImageCellLayout
Dim instance As DataGridViewImageColumn
Dim value As DataGridViewImageCellLayout

value = instance.ImageLayout

instance.ImageLayout = value
public DataGridViewImageCellLayout ImageLayout { get;
 set; }
public:
property DataGridViewImageCellLayout ImageLayout {
    DataGridViewImageCellLayout get ();
    void set (DataGridViewImageCellLayout value);
}
/** @property */
public DataGridViewImageCellLayout get_ImageLayout ()

/** @property */
public void set_ImageLayout (DataGridViewImageCellLayout
 value)
public function get ImageLayout
 () : DataGridViewImageCellLayout

public function set ImageLayout
 (value : DataGridViewImageCellLayout)

プロパティ
セルレイアウト指定する DataGridViewImageCellLayout。既定値Normal です。

例外例外
例外種類条件

InvalidOperationException

CellTemplate プロパティの値が null 参照 (Visual Basic では Nothing) です。

解説解説
使用例使用例

次のコード例は、イメージセル合わせて伸縮および拡大縮小する方法示してます。次の例は「方法 : Windows フォーム DataGridView コントロールイメージ列を操作する」で取り上げている例の一部です。

Private Sub Stretch(ByVal
 sender As Object, _
    ByVal e As EventArgs) Handles
 Button3.Click

    For Each column As DataGridViewImageColumn
 _
        In dataGridView1.Columns
        column.ImageLayout = DataGridViewImageCellLayout.Stretch
        column.Description = "Stretched image layout"
    Next
End Sub

Private Sub ZoomToImage(ByVal
 sender As Object, _
    ByVal e As EventArgs) Handles
 Button4.Click

    For Each column As DataGridViewImageColumn
 _
        In dataGridView1.Columns
        column.ImageLayout = DataGridViewImageCellLayout.Zoom
        column.Description = "Zoomed image layout"
    Next
End Sub

Private Sub NormalImage(ByVal
 sender As Object, _
    ByVal e As EventArgs) Handles
 Button5.Click

    For Each column As DataGridViewImageColumn
 _
        In dataGridView1.Columns
        column.ImageLayout = DataGridViewImageCellLayout.Normal
        column.Description = "Normal image layout"
    Next
End Sub
private void Stretch(object sender, EventArgs
 e)
{
    foreach (DataGridViewImageColumn column in
        dataGridView1.Columns)
    {
        column.ImageLayout = DataGridViewImageCellLayout.Stretch;
        column.Description = "Stretched";
    }
}

private void ZoomToImage(object sender, EventArgs
 e)
{

    foreach (DataGridViewImageColumn column in
        dataGridView1.Columns)
    {
        column.ImageLayout = DataGridViewImageCellLayout.Zoom;
        column.Description = "Zoomed";
    }
}

private void NormalImage(object sender, EventArgs
 e)
{

    foreach (DataGridViewImageColumn column in
        dataGridView1.Columns)
    {
        column.ImageLayout = DataGridViewImageCellLayout.Normal;
        column.Description = "Normal";
    }
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataGridViewImageColumn クラス
DataGridViewImageColumn メンバ
System.Windows.Forms 名前空間
DataGridView クラス
DataGridViewImageCellLayout 列挙
DataGridViewImageColumn.CellTemplate プロパティ
DataGridViewImageCell クラス
DataGridViewImageCell.ImageLayout プロパティ



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

辞書ショートカット

すべての辞書の索引

「DataGridViewImageColumn.ImageLayout プロパティ」の関連用語

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

   

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



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

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

©2024 GRAS Group, Inc.RSS