# TextControl.TextFrameAttributesDialog Method

> Invokes the built-in dialog box for setting attributes of text frames. This dialog box is only shown, if a text frame is currently selected. The TextFrameCollection.GetItem method can be used to test whether a text frame is selected or not.

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

---

### Description

Invokes the built-in dialog box for setting attributes of text frames. This dialog box is only shown, if a text frame is currently selected. The [TextFrameCollection.GetItem](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textframecollection/getitem-method/llms-full.txt) method can be used to test whether a text frame is selected or not.

### Syntax

#### TextFrameAttributesDialog()

Opens the dialog box showing the last opened tab.

```csharp
public System.Windows.Forms.DialogResult TextFrameAttributesDialog();
```

```vbnet
Public Function TextFrameAttributesDialog() As System.Windows.Forms.DialogResult
```

#### TextFrameAttributesDialog(int)

Opens the dialog box showing the specified tab.

```csharp
public System.Windows.Forms.DialogResult TextFrameAttributesDialog(int activeTab);
```

```vbnet
Public Function TextFrameAttributesDialog(activeTab As Integer) As System.Windows.Forms.DialogResult
```

| Parameter | Description |
|---|---|
| activeTab | Specifies the index of the tab, zero-based, that is displayed when the tabbed dialog box is opened. If this parameter is 0, the dialog box shows the tab for setting text wrapping and layout attributes, if this parameter is 1, the dialog box shows the tab for setting size and distances and if it is 2, the dialog shows the tab for setting further textframe attributes such as a frame line or a background color. |

### Return Value

If the dialog has been left with the Cancel button the return value is DialogResult.Cancel. Otherwise, it is DialogResult.OK.

### Examples

The following example opens the text frame attributes dialog for the text control.

```csharp
var result = textControl.TextFrameAttributesDialog(10);
Console.WriteLine($"Text Frame Attributes Dialog result: {result}");
```

```vbnet
Dim result = textControl.TextFrameAttributesDialog(10)
Console.WriteLine($"Text Frame Attributes Dialog result: {result}")
```

---

## Nearby

- **Previous:** [TextControl.TextFrameAppearanceChanged Event](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/textframeappearancechanged-event/llms-full.txt)
- **Next:** [TextControl.TextFrameClicked Event](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/textframeclicked-event/llms-full.txt)
