# TextControl.DrawingLayoutDialog Method

> Invokes the built-in dialog box for alter the layout settings, the size and the text distances of a drawing. This dialog can only be invoked, if a drawing has been selected.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 23.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.DrawingLayoutDialog Method
- **655 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/drawinglayoutdialog-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/drawinglayoutdialog-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/drawinglayoutdialog-method/llms-full.txt

---

### Description

Invokes the built-in dialog box for alter the layout settings, the size and the text distances of a drawing. This dialog can only be invoked, if a drawing has been selected.

### Syntax

#### DrawingLayoutDialog()

Opens the dialog box showing the last opened tab.

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

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

#### DrawingLayoutDialog(int)

Opens the dialog box showing the specified tab.

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

```vbnet
Public Function DrawingLayoutDialog(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 drawing attributes such as line- and background color, rotation and transparency. |

### 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 drawing layout dialog for the text control.

```csharp
var result = textControl.DrawingLayoutDialog(10);
Console.WriteLine($"Drawing Layout Dialog result: {result}");
```

```vbnet
Dim result = textControl.DrawingLayoutDialog(10)
Console.WriteLine($"Drawing Layout Dialog result: {result}")
```

---

## Nearby

- **Previous:** [TextControl.DrawingDoubleClicked Event](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/drawingdoubleclicked-event/llms-full.txt)
- **Next:** [TextControl.DrawingMarkerLines Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textcontrol/drawingmarkerlines-property/llms-full.txt)
