> For the complete documentation index, see [llms.txt](https://conusyntax.gitbook.io/products/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://conusyntax.gitbook.io/products/widget-blueprints/wbp_genericbutton/enabling-selection-states.md).

# Enabling Selection States

To ensure that your custom **Generic Buttons** display proper selection states (e.g., Selected, Deselected, or Hovered), they must be registered in the main menu's logic.

#### 1. Creating a Button Group

When adding Generic Buttons to the Designer, they are typically placed inside a container like a **Scroll Box**, **Wrap Box**, or **Horizontal Box**.

1. Select the container holding your buttons in the **Hierarchy**.
2. In the **Details**, check the **Is Variable** box.
3. Give this container a descriptive name (e.g., HairstyleButtonGroup).

<figure><img src="https://1883754984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6EcXMpvBDtWhtztAbvO1%2Fuploads%2FCppwyhHvwY6myeas7VQ1%2FEnabling%20Selection%20States%201.png?alt=media&amp;token=585c51ba-51fd-4440-a1cd-d7e9978247e7" alt=""><figcaption></figcaption></figure>

#### 2. Register the Group in the Menu Logic

To make the buttons within that container "selectable," you must register the container in the main creator menu:

1. Open the **WBP\_CreatorMenu** graph.
2. Go to **Functions** > **Getters** and open the **GetGenericButtons** function.

<figure><img src="https://1883754984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6EcXMpvBDtWhtztAbvO1%2Fuploads%2FhMiZb2lNiIODzxfej20s%2FGeneric%20Button%20-%20Get%20Generic%20Buttons.png?alt=media&amp;token=03021fc1-40dd-4d4a-a3b4-b3df7ac27ef9" alt=""><figcaption></figcaption></figure>

3. Drag your new button group variable into the graph.
4. In the **Make Array** node, click **Add Pin** and connect your button group variable to it.

<figure><img src="https://1883754984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6EcXMpvBDtWhtztAbvO1%2Fuploads%2FcbEb0Ps8sn5WIetC17Vu%2FGeneric%20Button%20-%20Make%20Array.png?alt=media&amp;token=e0a6fd87-8167-48cc-be16-045ae19ad140" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The **GetGenericButtons** function returns an array of all active button groups. By adding your container to this array, the system automatically manages the selection states for every button inside that container.
{% endhint %}
