GrapeCity MultiRow Windows Forms Documentation
Ellipsis Property (RadioGroupCell)
Example 


Gets or sets how to display an ellipsis when the width of the display text is greater than the cell's content width.
Syntax
<EditorBrowsableAttribute()>
<DefaultValueAttribute()>
<SRCategoryAttribute("Behavior")>
<BrowsableAttribute(True)>
<SRDescriptionAttribute("Indicates how to show an ellipsis when the width of the display text is greater than the cell's content area width.")>
Public Property Ellipsis As MultiRowEllipsisMode
Dim instance As RadioGroupCell
Dim value As MultiRowEllipsisMode
 
instance.Ellipsis = value
 
value = instance.Ellipsis
[EditorBrowsable()]
[DefaultValue()]
[SRCategory("Behavior")]
[Browsable(true)]
[SRDescription("Indicates how to show an ellipsis when the width of the display text is greater than the cell's content area width.")]
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 with the EllipsisString property.

When some cell styles are used, such as CellStyle.Multiline, CellStyle.TextAngle, CellStyle.TextAdjustment, and CellStyle.LineAdjustment, the ellipsis string cannot be displayed.
Example
The following code example shows some important properties of RadioGroupCell. In the first column, six radio cells are layed out over three columns by setting ColumnCount to 3. The radio cells range from left to right. There are 20 pixels between every two columns. In the second column, six radio cells are layed out over three columns. The radio cells range from top to bottom. There are 20 pixels between every two lines. The text cannot be displayed, so the EllipsisString is shown. This example is part of a larger example available for the RadioGroupCell class.
private void Form1_Load(object sender, EventArgs e)
        {
            RadioGroupCell radioGroupCell1 = new RadioGroupCell();
            radioGroupCell1.Size = new Size(150, 60);

            radioGroupCell1.Items.AddRange(new string[] { "1", "2", "3", "4", "5", "6" });
            radioGroupCell1.CheckAlign = ContentAlignment.MiddleLeft;
            //6 radio cells in 3 columns.
            radioGroupCell1.ColumnCount = 3;
            //The radio button ranges from left to right.
            radioGroupCell1.FlowDirection = Orientation.Horizontal;
            //Between every 2 columns, 20 pixels exist.
            radioGroupCell1.HorizontalSpace = 20;
            radioGroupCell1.FlatStyle = FlatStyle.Popup;

            RadioGroupCell radioGroupCell2 = new RadioGroupCell();
            radioGroupCell2.Size = new Size(150, 60);
            radioGroupCell2.Items.AddRange(new string[] { "11111", "22222", "33333", "44444", "55555", "66666" });
            radioGroupCell2.CheckAlign = ContentAlignment.MiddleLeft;
            //6 radio cells in 3 columns.
            radioGroupCell2.ColumnCount = 3;
            //The radio button ranges from top to bottom.
            radioGroupCell2.FlowDirection = Orientation.Vertical;
            //Between every 2 lines, 20 pixels exist.
            radioGroupCell2.VerticalSpace = 20;
            //
            radioGroupCell2.Ellipsis = MultiRowEllipsisMode.EllipsisEnd;
            radioGroupCell2.EllipsisString = "...";

            Template template1 = Template.CreateGridTemplate(new Cell[] { radioGroupCell1, radioGroupCell2 });

            gcMultiRow1.Template = template1;
            gcMultiRow1.RowCount = 3;
        }
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
        Dim radioGroupCell1 As New RadioGroupCell()
        radioGroupCell1.Size = New Size(150, 60)

        radioGroupCell1.Items.AddRange(New String() {"1", "2", "3", "4", "5", "6"})
        radioGroupCell1.CheckAlign = ContentAlignment.MiddleLeft
        '6 radio cells in 3 columns.
        radioGroupCell1.ColumnCount = 3
        'The radio button will range from left to right.
        radioGroupCell1.FlowDirection = Orientation.Horizontal
        'Between every 2 columns, 20 pixels exist.
        radioGroupCell1.HorizontalSpace = 20
        radioGroupCell1.FlatStyle = FlatStyle.Popup

        Dim radioGroupCell2 As New RadioGroupCell()
        radioGroupCell2.Size = New Size(150, 60)
        radioGroupCell2.Items.AddRange(New String() {"11111", "22222", "33333", "44444", "55555", "66666"})
        radioGroupCell2.CheckAlign = ContentAlignment.MiddleLeft
        '6 radio cells in 3 columns.
        radioGroupCell2.ColumnCount = 3
        'The radio button ranges from top to bottom.
        radioGroupCell2.FlowDirection = Orientation.Vertical
        'Between every 2 lines, 20 pixels exist.
        radioGroupCell2.VerticalSpace = 20
        '
        radioGroupCell2.Ellipsis = MultiRowEllipsisMode.EllipsisEnd
        radioGroupCell2.EllipsisString = "..."

        Dim template1 As Template = Template.CreateGridTemplate(New Cell() {radioGroupCell1, radioGroupCell2})

        gcMultiRow1.Template = template1
        gcMultiRow1.RowCount = 3
    End Sub
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

RadioGroupCell Class
RadioGroupCell Members
EllipsisString Property

 

 


Copyright © GrapeCity, inc. All rights reserved.