# EtoFormsMenuExtensionMethods.AddWithLabel examples

Examples for [AddWithLabel](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.etoformsmenuextensionmethods/addwithlabel.md) in Grasshopper2.Extensions.EtoFormsMenuExtensionMethods.

## C#

```cs
using Grasshopper2.Extensions;

// As an extension method
StackLayoutItem result = items.AddWithLabel(text, labels, control, expand);

// As a static method
result = EtoFormsMenuExtensionMethods.AddWithLabel(items, text, labels, control, expand);
```

## Python

```python
import clr
clr.AddReference('Grasshopper2')
import Grasshopper2.Extensions
clr.ImportExtensions(Grasshopper2.Extensions)

# As an extension method
result = items.AddWithLabel(text, labels, control, expand)

# As a static method
result = Grasshopper2.Extensions.EtoFormsMenuExtensionMethods.AddWithLabel(items, text, labels, control, expand)
```
