# TableOfContents.HasLinks Property

> Gets or sets a value specifying whether each entry in the table of contents is a DocumentLink with a corresponding DocumentTarget. When the end-user clicks on the link while pressing the CTRL-key, the document is scrolled to the paragraph in the document that belongs to the entry in the table of contents.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 29.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl > TableOfContents.HasLinks Property
- **583 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/tableofcontents/haslinks-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/tableofcontents/haslinks-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/tableofcontents/haslinks-property/llms-full.txt

---

### Description

Gets or sets a value specifying whether each entry in the table of contents is a [DocumentLink](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documentlink/llms-full.txt) with a corresponding [DocumentTarget](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documenttarget/llms-full.txt). When the end-user clicks on the link while pressing the CTRL-key, the document is scrolled to the paragraph in the document that belongs to the entry in the table of contents.

### Syntax

```csharp
public bool HasLinks { get; set; }
```

```vbnet
Public Property HasLinks As Boolean
```

### Examples

The following example creates a table of contents for the document's heading styles by using `TableOfContents.HasLinks`.

```csharp
TableOfContents tableOfContents = new(1, 3) { Name = "Contents", ID = 10 };
textControl.TablesOfContents.Add(tableOfContents);

tableOfContents.HasLinks = true;
if (tableOfContents.HasLinks)
{
    Console.WriteLine("Table Of Contents: Has Links is enabled.");
}
```

```vbnet
Dim tableOfContents As New TableOfContents(1, 3) With { .Name = "Contents", .ID = 10 }
textControl.TablesOfContents.Add(tableOfContents)

tableOfContents.HasLinks = True
If tableOfContents.HasLinks Then
    Console.WriteLine("Table Of Contents: Has Links is enabled.")
End If
```

---

## Nearby

- **Previous:** [TableOfContents.DefaultHighlightColor Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/tableofcontents/defaulthighlightcolor-property/llms-full.txt)
- **Next:** [TableOfContents.HasPageNumbers Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/tableofcontents/haspagenumbers-property/llms-full.txt)
