PowerTools InputMan for Windows Forms 8.0J
ItemImageAlign プロパティ
使用例 

リスト項目の画像の配置を取得または設定します。
構文
Public Property ItemImageAlign As HorizontalAlignment
public HorizontalAlignment ItemImageAlign {get; set;}

プロパティ値

リスト項目の画像の配置を表すHorizontalAlignment列挙体。 既定値はLeftです。
解説
このプロパティは、イメージのどの位置を固定するかを決定します。ShowItemImageの値がfalseの場合、このプロパティは効果がありません。
使用例
外観を設定した GcListBox コントロールを作成するコード例を次に示します。この例では他に GradientEffect、 ItemImageAlign、 ItemImageWidthShowItemImageShowCheckBoxThreeDCheckBoxes プロパティを使用しています。
//  Please use the following namespace
//  using System.Windows.Forms;
//  using GrapeCity.Win.Editors;

public void SetAppearanceSettings()
{
    // Creates the GcListBox control.
    GcListBox gcListBox1 = new GcListBox();

    // Creates the GradientEffect.
    GradientEffect gradienteffect = new GradientEffect();
    gradienteffect.Direction = GrapeCity.Win.Editors.GradientDirection.Side;
    gradienteffect.EndColor = System.Drawing.Color.FromArgb(224, 224, 224);

    // Sets the GradientEffect to the control.
    gcListBox1.GradientEffect = gradienteffect;

    // Sets the image of the item settings.
    gcListBox1.ItemImageAlign = System.Windows.Forms.HorizontalAlignment.Center;
    gcListBox1.ItemImageWidth = 30;
    gcListBox1.ShowItemImage = true;

    // Sets the check box settings for displaying the check box of ListItem.
    gcListBox1.ShowCheckBox = true;
    gcListBox1.ThreeDCheckBoxes = true;
}
'  Please use the following namespace
'  Imports System.Windows.Forms;
'  Imports GrapeCity.Win.Editors;

Public Sub SetAppearanceSettings()
    ' Creates the GcListBox control.
    Dim gcListBox1 As New GcListBox()

    ' Creates the GradientEffect.
    Dim gradienteffect As New GradientEffect()
    gradienteffect.Direction = GrapeCity.Win.Editors.GradientDirection.Side
    gradienteffect.EndColor = System.Drawing.Color.FromArgb(224, 224, 224)

    ' Sets the GradientEffect to the control.
    gcListBox1.GradientEffect = gradienteffect

    ' Sets the image of the item settings.
    gcListBox1.ItemImageAlign = System.Windows.Forms.HorizontalAlignment.Center
    gcListBox1.ItemImageWidth = 30
    gcListBox1.ShowItemImage = True

    ' Sets the check box settings for displaying the check box of ListItem.
    gcListBox1.ShowCheckBox = True
    gcListBox1.ThreeDCheckBoxes = True
End Sub
参照

GcListBox クラス
GcListBox メンバ
ItemImageWidth プロパティ

 

 


© 2004-2015 GrapeCity inc. All rights reserved.