Spread for ASP.NET 10 Product Documentation
Text Property (TagCloudItem)
Example 


Gets or sets the text for individual hyperlinks.
Syntax
'Declaration
 
Public Property Text As String
'Usage
 
Dim instance As TagCloudItem
Dim value As String
 
instance.Text = value
 
value = instance.Text
public string Text {get; set;}

Property Value

String containing the text for the item in the tag cloud
Example
This example shows the use of the tag cloud items.
FarPoint.Web.Spread.TagCloudCellType tagCell = new FarPoint.Web.Spread.TagCloudCellType();
FarPoint.Web.Spread.Renderer.TagCloudItem tgItem1 = new FarPoint.Web.Spread.Renderer.TagCloudItem();
tgItem1.DisplayText = "SEARCH";
tgItem1.Href = "http://www.google.com";
tgItem1.Text = "Text1";
tgItem1.Title = "Click here to search";
tgItem1.Weight = 60;
FarPoint.Web.Spread.Renderer.TagCloudItem tgItem2 = new FarPoint.Web.Spread.Renderer.TagCloudItem();
tgItem2.DisplayText = "ASP.NET";
tgItem2.Href = "http://www.farpointspread.com/";
tgItem2.Text = "Text2";
tgItem2.Title = "Learn more about Spread for ASP.NET";
tgItem1.Weight = 90;
FarPoint.Web.Spread.Renderer.TagCloudItem tgItem3 = new FarPoint.Web.Spread.Renderer.TagCloudItem();
tgItem3.DisplayText = "JAVASCRIPT";
tgItem3.Href = "http://www.w3schools.com/js/";
tgItem3.Text = "Text3";
tgItem3.Title = "Learn details about JavaScript";
tgItem3.Weight = 120;

tagCell.TagCloudItems.Add(tgItem1);
tagCell.TagCloudItems.Add(tgItem2);
tagCell.TagCloudItems.Add(tgItem3);
FpSpread1.ActiveSheetView.Cells[1, 1].CellType = tagCell;
//try with some methods of TagCloudItems
tagCell.TagCloudItems.Clear();//clear all items
tagCell.TagCloudItems.Insert(1, tgItem3); //insert tgItem3 
tagCell.TagCloudItems.Remove(tgItem2); //remove tagItem2
tagCell.TagCloudItems.RemoveAt(1); //remove item with index 2
ListBox1.Items.Add(tagCell.TagCloudItems.Count.ToString());
ListBox1.Items.Add(tagCell.TagCloudItems.IndexOf(tgItem3).ToString());
Dim tagCell As New FarPoint.Web.Spread.TagCloudCellType()
Dim tgItem1 As New FarPoint.Web.Spread.Renderer.TagCloudItem()
tgItem1.DisplayText = "SEARCH"
tgItem1.Href = "http://www.google.com"
tgItem1.Text = "Text1"
tgItem1.Title = "Click here to search"
tgItem1.Weight = 60
Dim tgItem2 As New FarPoint.Web.Spread.Renderer.TagCloudItem()
tgItem2.DisplayText = "ASP.NET"
tgItem2.Href = "http://www.farpointspread.com/"
tgItem2.Text = "Text2"
tgItem2.Title = "Learn more about Spread for ASP.NET"
tgItem1.Weight = 90
Dim tgItem3 As New FarPoint.Web.Spread.Renderer.TagCloudItem()
tgItem3.DisplayText = "JAVASCRIPT"
tgItem3.Href = "http://www.w3schools.com/js/"
tgItem3.Text = "Text3"
tgItem3.Title = "Learn details about JavaScript"
tgItem3.Weight = 120

tagCell.TagCloudItems.Add(tgItem1)
tagCell.TagCloudItems.Add(tgItem2)
tagCell.TagCloudItems.Add(tgItem3)
FpSpread1.ActiveSheetView.Cells(1, 1).CellType = tagCell
'try with some methods of TagCloudItems
tagCell.TagCloudItems.Clear()
'clear all items
tagCell.TagCloudItems.Insert(1, tgItem3)
'insert tgItem3
tagCell.TagCloudItems.Remove(tgItem2)
'remove tagItem2
tagCell.TagCloudItems.RemoveAt(1)
'remove item with index 2
ListBox1.Items.Add(tagCell.TagCloudItems.Count.ToString())
ListBox1.Items.Add(tagCell.TagCloudItems.IndexOf(tgItem3).ToString())
Requirements

Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

TagCloudItem Class
TagCloudItem Members

 

 


Copyright © GrapeCity, inc. All rights reserved.