Spread for ASP.NET 7.0 Product Documentation
Href Property
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread.Renderer Namespace > TagCloudItem Class : Href Property


Glossary Item Box

Get or sets the address of the HTML anchor.

Syntax

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

Property Value

String containing the address of the HTML anchor

Remarks

This is the URL of the destination of the link for the item in the tag cloud.

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 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

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.