# GroupBox

The `GroupBox` displays a frame around a group of controls with or without a caption. Use a `GroupBox` to logically group a collection of controls on a form. The `GroupBox` is a container control that can be used to define groups of controls.

A typical use for a group box is to contain a logical group of `RadioButton` controls. When you have two group boxes, each containing several radio buttons, each group of buttons is mutually exclusive, setting one option value per group.

You can add controls to the `GroupBox` using the `Add` method of the `Controls` property.

{% hint style="info" %}
For a full list of properties, methods and events see the [API documentation.](http://docs.wisej.com/api)
{% endhint %}

## Features

### Collapsible

The visibility of the `GroupBox` can be controlled at runtime using the `ShowCloseButton` property.

![GroupBox demonstrating collapsible functionality](/files/-MjaMTHOgdB5nCSvt4xl)

### CheckBox

The `GroupBox` control features an optional checkbox that can be toggled to enable or disable the child controls. Set the `ShowCheckBox` property to true to show the checkbox. Set the `Checked` property to toggle the checked state.

![GroupBox showing checkbox integration for enabling/disabling contents](/files/-MjaLlm9zPLo1XPv4cV-)

### AutoSize

When enabled, the `GroupBox` control resizes itself to fit its contents according to the `AutoSizeMode` property specified.

![GroupBox demonstrating automatic resizing behavior](/files/-Mf8uSfqW0EnGkzXqcr-)

## Advanced

### JavaScript Widget

| Item             | Description                                                                                                                                                                        |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Class name       | "wisej.web.GroupBox"                                                                                                                                                               |
| Theme appearance | "groupbox", see [Themes](https://docs.wisej.com/theme-builder/theme-elements/elements).                                                                                            |
| Child components | "legend" is the groupbox legend. "frame" is the groupbox frame. "close-button" is the button that hides the groupbox. See [JavaScript](/docs/concepts/javascript-object-model.md). |
| Source code      | [https://github.com/iceteagroup/wisej-js](https://github.com/iceteagroup/wisej-js/blob/master/wisej.web.TextBox.js)                                                                |


---

# 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://docs.wisej.com/docs/controls/containers/groupbox.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.
