GrapeCity MultiRow Windows Forms Documentation
Setting Bullets (ListLabelCell)

You can use the ListLabelCell.BulletStyle property to set bullets in the list items of a list label cell. This section describes how to set bullets.

Setting Bullets Using the Designer

  1. Add a list label cell in the row (for example: listLabelCell1).
  2. Select listLabelCell1, and in the Properties window, set the bullets with the BulletStyle property.

Using Code

This example sets the bullets.

[VB]

Imports GrapeCity.Win.MultiRow 
Dim listLabelCell1 As New ListLabelCell()
listLabelCell1.Name = "listLabelCell1" 
listLabelCell1.Items.AddRange(New String() {"aaa", "bbb", "ccc"}) 
listLabelCell1.BulletStyle = BulletStyle.Numbered
GcMultiRow1.Template = Template.CreateGridTemplate(New Cell() {listLabelCell1}) 
GcMultiRow1.RowCount = 10

[CS]

using GrapeCity.Win.MultiRow; 
ListLabelCell listLabelCell1 = new ListLabelCell(); 
listLabelCell1.Name = "listLabelCell1"; 
listLabelCell1.Items.AddRange(new string[] { "aaa", "bbb", "ccc" }); 
listLabelCell1.BulletStyle = BulletStyle.Numbered; 
gcMultiRow1.Template = Template.CreateGridTemplate(new Cell[] { listLabelCell1 });
gcMultiRow1.RowCount = 10;

Setting Characters in Bullets

You can set any characters in the bullets. Set the ListLabelCell.BulletStyle property to CustomTextBullet, create a class that implements the ICustomTextBullet interface, and set it in the CustomTextBullet property.

Using Code

This example creates a class for a custom bullet.

[VB]

Imports GrapeCity.Win.MultiRow 
Public Class JapaneseBullet Implements ICustomTextBullet 
Public Function GetTextBullet(ByVal index As Integer) As String Implements GrapeCity.Win.MultiRow.ICustomTextBullet.GetTextBullet 
If index = 0 Then Return "1" 
ElseIf index = 1 
Then Return "2" 
ElseIf index = 2 
Then Return "3" 
Else
Return "Other" 
End If 
End Function 
End Class 
listLabelCell1.BulletStyle = BulletStyle.CustomTextBullet 
listLabelCell1.CustomTextBullet = New JapaneseBullet

[CS]

using GrapeCity.Win.MultiRow; 
public class JapaneseBullet : ICustomTextBullet 
{ 
public string GetTextBullet(int index) 
{ 
if(index == 0) 
{ 
return "1"; 
} 
else if(index == 1) 
{ 
return "2"; 
} 
else if (index == 2) 
{ 
return "3"; 
}
else 
{ 
return "Other"; 
} 
} 
}
listLabelCell1.BulletStyle = BulletStyle.CustomTextBullet; 
listLabelCell1.CustomTextBullet = new JapaneseBullet();

Setting Images in Bullets

You can set an image in the bullets. Set the ListLabelCell.BulletStyle property to CustomImage, and set the image data type in the BulletImage property.

Using Code

This example sets an image in the bullet.

[VB]

Imports GrapeCity.Win.MultiRow 
listLabelCell1.BulletStyle = BulletStyle.CustomImage 
listLabelCell1.BulletImage = Image.FromFile("test.png")

[CS]

using GrapeCity.Win.MultiRow; 
listLabelCell1.BulletStyle = BulletStyle.CustomImage; 
listLabelCell1.BulletImage = Image.FromFile("test.png");
See Also

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options