# Tabs, Containers, and Parameters

It´s possible to create parameters within your plugin which are exposed and direct available within Grid.

## Define where a parameter should be exposed&#x20;

A parameter needs to be linked to a container.&#x20;

### Plugin Tab

Each plugin has an own plugin related tab.\
To access this you need to use:

```python
self.objectContainer
```

<figure><img src="/files/VOyKpKohQlXZA88iCqp0" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}

#### `sp.BaseModule` plugins are using `self.moduleContainer` instead

{% endhint %}

***

### Existing Tab

```python
self.cc.display
```

<figure><img src="/files/OjheKJg2WyGLQgHC0XGg" alt=""><figcaption></figcaption></figure>

***

### Extension Root&#x20;

```python
self.cc
```

self.cc is the root of any extension.&#x20;

{% hint style="warning" %}
Technically it´s possible to add here already a parameter, but this is **not** recommended.\
A parameter at this level will always be visible and is independent from any chosen tab.
{% endhint %}

***

### Custom Tab

```python
def afterInit(self):
    myTab = self.addContainer("My New Tab", self.cc)
```

<figure><img src="/files/5J0p6dAmDVIsAYqaDRSU" alt=""><figcaption></figcaption></figure>

***

### Sub Container

```python
def afterInit(self):
    myTab  = self.addContainer("My New Tab", self.cc)
    
    mySubContainer1 = self.addContainer("Container1", myTab)
    mySubContainer2 = self.addContainer("Container2", myTab)
```

<figure><img src="/files/HF4QKvC430O94lfzcw3f" alt=""><figcaption></figcaption></figure>

***

## Adding a Parameter

```python
def afterInit(self):
    self.objectContainer.addFloatParameter("Example Float", 0, 0, 100)
```

<figure><img src="/files/UBF0eGVQQnDCf2fKbkW7" alt=""><figcaption></figcaption></figure>

***

## Adding a Parameter in Container

```python
def afterInit(self):
    mySubContainer1 = self.addContainer("Container1", self.objectContainer)
    mySubContainer1.addFloatParameter("Example Float", 0, 0, 100)
    
    mySubContainer2 = self.addContainer("Container2", self.objectContainer)
    mySubContainer2.addFloatParameter("Example Float", 0, 0, 100)
```

<figure><img src="/files/U8pf1rBhOfYFECFA61gU" alt=""><figcaption></figcaption></figure>

***

## Adding a Parameter in custom tab in Container

```python
def afterInit(self):
    myTab  = self.addContainer("My New Tab", self.cc)

    mySubContainer1 = self.addContainer("Container1", myTab)
    mySubContainer1.addFloatParameter("Example Float", 0, 0, 100)
    
    mySubContainer2 = self.addContainer("Container2", myTab)
    mySubContainer2.addFloatParameter("Example Float", 0, 0, 100)
```

<figure><img src="/files/yVTtFxBPGsuRlRE2SteI" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://stage-precision.gitbook.io/grid/extensions/tabs-containers-and-parameters.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
