# CommentedText.Active Property

> Gets or sets a value specifying whether the comment is currently active or not. An inactive comment is not highlighted and is not retrieved through the CommentCollection.GetItem method. When the state changes from active to inactive or vise versa, a CommentStateChanged event occurs.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 30.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 > CommentedText.Active Property
- **655 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/commentedtext/active-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/commentedtext/active-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/commentedtext/active-property/llms-full.txt

---

### Description

Gets or sets a value specifying whether the comment is currently active or not. An inactive comment is not highlighted and is not retrieved through the [CommentCollection.GetItem](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/commentcollection/getitem-method/llms-full.txt) method. When the state changes from active to inactive or vise versa, a [CommentStateChanged](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/commentstatechanged-event/llms-full.txt) event occurs.

### Syntax

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

```vbnet
Public Property Active As Boolean
```

### Examples

The following example attaches a reviewer comment to selected contract text by using `CommentedText.Active`.

```csharp
textControl.Text = "Payment is due within 30 days.";
textControl.Select(0, textControl.Text.Length);
CommentedText commentedText = new("Verify the payment term.");
textControl.Comments.Add(commentedText);

commentedText.Active = true;
if (commentedText.Active)
{
    Console.WriteLine("Commented Text: Active is enabled.");
}
```

```vbnet
textControl.Text = "Payment is due within 30 days."
textControl.Select(0, textControl.Text.Length)
Dim commentedText As New CommentedText("Verify the payment term.")
textControl.Comments.Add(commentedText)

commentedText.Active = True
If commentedText.Active Then
    Console.WriteLine("Commented Text: Active is enabled.")
End If
```

---

## Nearby

- **Previous:** [CommentedText Class](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/commentedtext/llms-full.txt)
- **Next:** [CommentedText.Comment Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/commentedtext/comment-property/llms-full.txt)
