Spread for ASP.NET 8.0 Product Documentation
DisplayText Property
Example 


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

Property Value

String containing the text displayed
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 Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

Reference

TagCloudItem Class
TagCloudItem Members

 

 


Copyright © GrapeCity, inc. All rights reserved.