GrapeCity.Win.MultiRow Namespace > ComboBoxCell Class : DropDownWidth Property |
<SRDescriptionAttribute("Indicates the width, in pixels, of the drop-down box in the ComboBoxCell.")> <DefaultValueAttribute()> <SRCategoryAttribute("Appearance")> Public Overridable Property DropDownWidth As Integer
Dim instance As ComboBoxCell Dim value As Integer instance.DropDownWidth = value value = instance.DropDownWidth
[SRDescription("Indicates the width, in pixels, of the drop-down box in the ComboBoxCell.")] [DefaultValue()] [SRCategory("Appearance")] public virtual int DropDownWidth {get; set;}
Exception | Description |
---|---|
System.ArgumentOutOfRangeException | The assigned value is less than 0. |
ComboBoxCell CreateCommonComboBoxCell() { ComboBoxCell comboBoxCell = new ComboBoxCell(); // The item listed in the drop down window. comboBoxCell.Items.AddRange("Item2", "Item1", "Item3", "Item4", "Long Item to Make Ellipsis Show"); // Sort items. comboBoxCell.Sorted = true; // Drop down window's width, in default. The value is equal to the cell's width. comboBoxCell.DropDownWidth = 100; // If not in edit mode, if text's length is bigger than cell's width, EllipsisString is shown. comboBoxCell.Ellipsis = MultiRowEllipsisMode.EllipsisEnd; return comboBoxCell; }
Private Function CreateCommonComboBoxCell() As ComboBoxCell Dim comboBoxCell As New ComboBoxCell() ' The item listed in the drop down window. comboBoxCell.Items.AddRange("Item2", "Item1", "Item3", "Item4", "Long Item to Make Ellipsis Show") ' Sort items. comboBoxCell.Sorted = True ' Drop down window's width, in default. The value is equal to the cell's width. comboBoxCell.DropDownWidth = 100 ' If not in edit mode, if text's length bigger than cell's width, EllipsisString is shown. comboBoxCell.Ellipsis = MultiRowEllipsisMode.EllipsisEnd Return comboBoxCell End Function
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2