GrapeCity MultiRow Windows Forms Documentation
Ellipsis Property (ComboBoxCell)
Example 


Gets or sets how to show an ellipsis when the width of the display text is greater than the cell's content boundary width.
Syntax
<BrowsableAttribute(True)>
<SRCategoryAttribute("Behavior")>
<SRDescriptionAttribute("Indicates how to show an ellipsis when the width of the display text is greater than the cell's content area width.")>
<DefaultValueAttribute()>
<EditorBrowsableAttribute()>
Public Property Ellipsis As MultiRowEllipsisMode
Dim instance As ComboBoxCell
Dim value As MultiRowEllipsisMode
 
instance.Ellipsis = value
 
value = instance.Ellipsis
[Browsable(true)]
[SRCategory("Behavior")]
[SRDescription("Indicates how to show an ellipsis when the width of the display text is greater than the cell's content area width.")]
[DefaultValue()]
[EditorBrowsable()]
public MultiRowEllipsisMode Ellipsis {get; set;}

Property Value

One of the MultiRowEllipsisMode values. The default is MultiRowEllipsisMode.None.
Exceptions
ExceptionDescription
System.ComponentModel.InvalidEnumArgumentExceptionThe specified value is not one of the MultiRowEllipsisMode values.
Remarks

Use this property together with EllipsisString.

When certain cell styles are used, such as Multiline, TextAngle, TextAdjustment, and LineAdjustment, the ellipsis string cannot be displayed.
Example
The following code example shows how to customize a combo box cell's behavior or appearance. This code example is part of a larger example provided for the ComboBoxCell class.
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
Requirements

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

See Also

Reference

ComboBoxCell Class
ComboBoxCell Members
EllipsisString Property

 

 


Copyright © GrapeCity, inc. All rights reserved.