PowerTools InputMan for Windows Forms 8.0J
ShowListBoxImage プロパティ (GcMaskedComboBox)
使用例 

ドロップダウンリストの先頭カラムに画像を表示するかどうかを取得または設定します。
構文
Public Property ShowListBoxImage As Boolean
public bool ShowListBoxImage {get; set;}

プロパティ値

bool値。画像を表示する場合はtrueそれ以外の場合はfalse
既定値はfalseです。
解説
このプロパティがtrueで、ListItem.Imageプロパティがnull 参照 (Visual Basicでは Nothing)参照 (Visual Basic では Nothing) でない場合、先頭カラムに画像が表示されます。
使用例
特定の外観を設定したGcMaskedComboBox コントロールを作成するコード例を次に示します。この例では他にListGradientEffectImageAlignImageWidthShowListBoxImageプロパティを使用しています。
'  Please use the following namespace
'  Imports System.Windows.Forms;
'  Imports GrapeCity.Win.Editors;

Public Sub SetAppearanceSettings()
    ' Creates the GcMaskedComboBox control.
    Dim gcMaskedComboBox1 As New GcMaskedComboBox()

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

    ' Sets the GradientEffect to the control.
    gcMaskedComboBox1.ListGradientEffect = gradienteffect

    ' Sets the image of the item settings.
    gcMaskedComboBox1.ImageAlign = System.Windows.Forms.HorizontalAlignment.Center
    gcMaskedComboBox1.ImageWidth = 30
    gcMaskedComboBox1.ShowListBoxImage = True
End Sub
//  Please use the following namespace
//  using System.Windows.Forms;
//  using GrapeCity.Win.Editors;

public void SetAppearanceSettings()
{
    // Creates the GcMaskedComboBox control.
    GcMaskedComboBox gcMaskedComboBox1 = new GcMaskedComboBox();

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

    // Sets the GradientEffect to the control.
    gcMaskedComboBox1.ListGradientEffect = gradienteffect;

    // Sets the image of the item settings.
    gcMaskedComboBox1.ImageAlign = System.Windows.Forms.HorizontalAlignment.Center;
    gcMaskedComboBox1.ImageWidth = 30;
    gcMaskedComboBox1.ShowListBoxImage = true;
}
参照

GcMaskedComboBox クラス
GcMaskedComboBox メンバ
ImageWidth プロパティ
ImageAlign プロパティ

 

 


© 2004-2015 GrapeCity inc. All rights reserved.