Spread ASP.NET 6.0 Product Documentation
DisplayText Property
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread.Renderer Namespace > TagCloudItem Class : DisplayText Property


Glossary Item Box

Gets or sets the text displayed for individual hyperlinks.

Syntax

Visual Basic (Declaration) 
Public Property DisplayText As String
Visual Basic (Usage)Copy Code
Dim instance As TagCloudItem
Dim value As String
 
instance.DisplayText = value
 
value = instance.DisplayText
C# 
public string DisplayText {get; set;}

Property Value

String containing the text displayed

Example

This example shows the use of the tag cloud items.
C#Copy Code
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());
Visual BasicCopy Code
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 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.