# GroupBox

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (4.0.0.0)

* [Control](https://docs.wisej.com/api/wisej.web/general/control)
  * [GroupBox](https://docs.wisej.com/api/wisej.web/containers/wisej.web.groupbox)

Represents a Wisej control that displays a frame around a group of controls with an optional caption.

{% tabs %}
{% tab title="C#" %}

```csharp
public class GroupBox : Control
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class GroupBox
    Inherits Control
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) GroupBox()

Initializes a new instance of the [GroupBox](https://docs.wisej.com/api/wisej.web/containers/wisej.web.groupbox) class.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) GroupBox(text, controls)

Initializes a new instance of the [GroupBox](https://docs.wisej.com/api/wisej.web/containers/wisej.web.groupbox) class with the specified text.

| Name         | Type                                                                | Description                                                                                                               |
| ------------ | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| **text**     | [String](https://docs.microsoft.com/dotnet/api/system.string)       | The text to display on the [GroupBox](https://docs.wisej.com/api/wisej.web/containers/wisej.web.groupbox).                |
| **controls** | [Control\[\]](https://docs.wisej.com/api/wisej.web/general/control) | An array of control objects to add to the [GroupBox](https://docs.wisej.com/api/wisej.web/containers/wisej.web.groupbox). |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) GroupBox(text, location, size, controls)

Initializes a new instance of the [GroupBox](https://docs.wisej.com/api/wisej.web/containers/wisej.web.groupbox) class with the specified controls, text, and collapsed state.

| Name         | Type                                                                | Description                                                                                                               |
| ------------ | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| **text**     | [String](https://docs.microsoft.com/dotnet/api/system.string)       | The text to display on the [GroupBox](https://docs.wisej.com/api/wisej.web/containers/wisej.web.groupbox).                |
| **location** | [Point](https://docs.microsoft.com/dotnet/api/system.drawing.point) | Initial location.                                                                                                         |
| **size**     | [Size](https://docs.microsoft.com/dotnet/api/system.drawing.size)   | Initial size.                                                                                                             |
| **controls** | [Control\[\]](https://docs.wisej.com/api/wisej.web/general/control) | An array of control objects to add to the [GroupBox](https://docs.wisej.com/api/wisej.web/containers/wisej.web.groupbox). |

## Properties

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) AllowHtml

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets a value indicating that the control can display html in the Text property. (Default: `False`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) AutoSize

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets a value that indicates whether the [GroupBox](https://docs.wisej.com/api/wisej.web/containers/wisej.web.groupbox) resizes based on its contents. (Default: `False`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) AutoSizeMode

[AutoSizeMode](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.autosizemode): Returns or sets the mode by which the [Button](https://docs.wisej.com/api/wisej.web/buttons/button) automatically resizes itself. (Default: `GrowOnly`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Checked

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Gets or sets whether the checkbox next to the group box title is checked or unchecked. (Default: `True`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) Collapsed

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets a value that indicates whether the [GroupBox](https://docs.wisej.com/api/wisej.web/containers/wisej.web.groupbox) is collapsed or expanded. (Default: `False`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) CollapsedBounds

[Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle): Returns the collapsed bounds.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) DefaultPadding

[Padding](https://docs.wisej.com/api/wisej.web/general/wisej.web.padding): Returns the [Padding](https://docs.wisej.com/api/wisej.web/general/wisej.web.padding) structure that contains the default padding settings for a [GroupBox](https://docs.wisej.com/api/wisej.web/containers/wisej.web.groupbox) control.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) DisplayRectangle

[Rectangle](https://docs.microsoft.com/dotnet/api/system.drawing.rectangle): Returns a rectangle that represents the inner dimensions of the [GroupBox](https://docs.wisej.com/api/wisej.web/containers/wisej.web.groupbox) control.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) RightToLeftLayout

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Enables or disables right-to-left layout when the value of [RightToLeft](https://docs.wisej.com/api/general/control#righttoleft) is [Yes](https://docs.wisej.com/api/enumerations/wisej.web.righttoleft#fields) (Default: `False`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ShowCheckBox

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Gets or sets whether the group box shows a checkbox next to the text. (Default: `False`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) ShowCloseButton

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets a value that indicates the [GroupBox](https://docs.wisej.com/api/wisej.web/containers/wisej.web.groupbox) displays the open/close button next to the title. (Default: `False`)

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) UseMnemonic

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean): Returns or sets whether the first character that is preceded by an ampersand (&) is used as the mnemonic key of the control. (Default: `True`)

## Methods

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnCheckedChanged(e)

Fires the [CheckedChanged](#checkedchanged) event.

| Parameter | Type                                                                | Description                                                                                         |
| --------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **e**     | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | A [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnControlAdded(e)

Fires the [ControlAdded](https://docs.wisej.com/api/general/control#controladded) event.

| Parameter | Type                                                                                                | Description                                                                                                                         |
| --------- | --------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| **e**     | [ControlEventArgs](https://docs.wisej.com/api/wisej.web/general/control/wisej.web.controleventargs) | A [ControlEventArgs](https://docs.wisej.com/api/wisej.web/general/control/wisej.web.controleventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnGroupBoxCollapsed(e)

Fires the [GroupBoxCollapsed](#groupboxcollapsed) event.

| Parameter | Type                                                                | Description                                                                                         |
| --------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **e**     | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | A [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnGroupBoxExpanded(e)

Fires the [GroupBoxExpanded](#groupboxexpanded) event.

| Parameter | Type                                                                | Description                                                                                         |
| --------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **e**     | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | A [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnRightToLeftLayoutChanged(e)

Fires the [RightToLeftLayoutChanged](#righttoleftlayoutchanged) event.

| Parameter | Type                                                                | Description                                                                                         |
| --------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| **e**     | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | A [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnWebEvent(e)

| Parameter | Type                                                                           | Description |
| --------- | ------------------------------------------------------------------------------ | ----------- |
| **e**     | [WisejEventArgs](https://docs.wisej.com/api/wisej.core/general/wisejeventargs) |             |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) OnWebRender(config)

| Parameter  | Type                                                          | Description |
| ---------- | ------------------------------------------------------------- | ----------- |
| **config** | [Object](https://docs.microsoft.com/dotnet/api/system.object) |             |

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-9bf7fa01e02f4da0f9ef90d3b049ae43e664919e%2Fprotected.png?alt=media) SetBoundsCore(x, y, width, height, specified)

Sets the specified bounds of the [GroupBox](https://docs.wisej.com/api/wisej.web/containers/wisej.web.groupbox) control.

| Parameter     | Type                                                                                           | Description                                                                                                                 |
| ------------- | ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| **x**         | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                                    | The new [Left](https://docs.wisej.com/api/general/control#left) property value of the control.                              |
| **y**         | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                                    | The new [Top](https://docs.wisej.com/api/general/control#top) property value of the control.                                |
| **width**     | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                                    | The new [Width](https://docs.wisej.com/api/general/control#width) property value of the control.                            |
| **height**    | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                                    | The new [Height](https://docs.wisej.com/api/general/control#height) property value of the control.                          |
| **specified** | [BoundsSpecified](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.boundsspecified) | A combination of the [BoundsSpecified](https://docs.wisej.com/api/wisej.web/enumerations/wisej.web.boundsspecified) values. |

## Events

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) CheckedChanged

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the value of the [Checked](#checked) property changes.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) GroupBoxCollapsed

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the groupbox is collapsed.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) GroupBoxExpanded

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the groupbox is expanded.

### ![](https://1075938901-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2HvlWXJQMV7DxhGzw7Y1%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media) RightToLeftLayoutChanged

[EventHandler](https://docs.microsoft.com/dotnet/api/system.eventhandler) Fired when the value of the [RightToLeftLayout](#righttoleftlayout) property changes.

## Implements

| Name                                                                                                 | Description                                                                                                                              |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| [IUserData](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.iuserdata)                     | Provides access to the `UserData` and `Tag` properties associated to the component implementing this interface.                          |
| [IBindableComponent](https://docs.wisej.com/api/wisej.web/data-binding/wisej.web.ibindablecomponent) | Bindable components implement this interface.                                                                                            |
| [IDropTarget](https://docs.wisej.com/api/wisej.web/interfaces/wisej.web.idroptarget)                 | Controls that support drag & drop operations implement this interface.                                                                   |
| [IWisejComponent](https://docs.wisej.com/api/wisej.core/interfaces/wisej.core.iwisejcomponent)       | All wisej components implement this interface.                                                                                           |
| [IWisejControl](https://docs.wisej.com/api/wisej.core/interfaces/wisej.core.iwisejcontrol)           | All wisej controls derived from the [Control](https://docs.wisej.com/api/wisej.web/general/control) class must implement this interface. |
| [IWisejSerializable](https://docs.wisej.com/api/wisej.core/interfaces/wisej.core.iwisejserializable) | Allows an object to serialize itself.                                                                                                    |
