# DrawingGroup Class

> DrawingGroup class in the TX Sheet Control TypeScript API for Node.js: A group handle that transforms its members together in unscaled worksheet coordinates.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Class
- **Path:** TX Sheet Control > API Reference > TypeScript API > Node.js Server > DrawingGroup Class
- **1205 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/llms-full.txt

---

A group handle that transforms its members together in unscaled worksheet coordinates.

Package: `@txtextcontrol/tx-sheet-control-server`. Version: **2.0.0**.

Related workbook object-model type, returned through the server control. Obtain it from its owning workbook or collection; it is not a required browser-package import.

### Constructor

```typescript
new DrawingGroup(sheet: Worksheet, id: string): DrawingGroup
```

| Parameter | Type | Optional | Description |
|---|---|---|---|
| `sheet` | `Worksheet` | No | Value matching sheet's declared type and the owning object's validation rules. |
| `id` | `string` | No | Stable identity in the owning document/collection. |

Returns: `DrawingGroup`.

### Members

#### Properties

| Property | Description |
|---|---|
| [id](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/id-property/llms-full.txt) | The id value of DrawingGroup. |
| [members](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/members-property/llms-full.txt) | The members value of DrawingGroup. |
| [sheet](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/sheet-property/llms-full.txt) | The sheet value of DrawingGroup. |
| [size](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/size-property/llms-full.txt) | The size value of DrawingGroup. |

#### Methods

| Method | Description |
|---|---|
| [bringForward](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/bringforward-method/llms-full.txt) | Move the group forward one step. |
| [bringToFront](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/bringtofront-method/llms-full.txt) | Move the group to the front. |
| [copyTo](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/copyto-method/llms-full.txt) | Copy members and group membership to another anchor. |
| [moveTo](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/moveto-method/llms-full.txt) | Move all members while preserving relative positions. |
| [remove](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/remove-method/llms-full.txt) | Delete all members. |
| [resize](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/resize-method/llms-full.txt) | Scale positions and sizes within group bounds. |
| [rotate](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/rotate-method/llms-full.txt) | Rotate group members around their shared center by an angle in degrees. |
| [sendBackward](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/sendbackward-method/llms-full.txt) | Move the group backward one step. |
| [sendToBack](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/sendtoback-method/llms-full.txt) | Move the group to the back. |
| [ungroup](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/ungroup-method/llms-full.txt) | Remove grouping and return member handles. |

### Examples

Use a fresh workbook. Create and format the sample data, apply this API and retain the returned document or result in your application. In the browser pass editor.workbook; in Node.js pass the server control.

```typescript
import type { ServerSheetControl } from '@txtextcontrol/tx-sheet-control-server';

function createDrawingGroupReport(control: ServerSheetControl) {
    const book = control.workbook;
    const sheet = book.sheets.at(0);
    sheet.cell('A1').setText('October invoice');
    sheet
        .cell('A1')
        .format({
            fontFamily: 'Liberation Sans',
            fontSize: 16,
            bold: true,
            textColor: '#ffffff',
            fillColor: '#163b63',
        });

    sheet.columns.at(0).setWidth({ pixels: 240 });
    sheet.range('B8:B9').setValues([[120], [80]]);
    sheet.cell('B10').setFormula('=SUM(B8:B9)');
    sheet.range('B8:B10').format({ numberFormatCode: '#,##0.00', fontSize: 11 });

    const first = sheet.drawings.addShape({ type: 'rectangle', anchor: { cell: 'F2' } });
    const second = sheet.drawings.addShape({ type: 'rectangle', anchor: { cell: 'H2' } });
    sheet.drawings.group([first, second]);
    return sheet;
}
```

### See Also

- [TypeScript Node.js Server API](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/llms-full.txt)
- [Pictures and Shapes](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/pictures-shapes/llms-full.txt)

---

## In This Section

- [DrawingGroup.bringForward Method](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/bringforward-method/llms-full.txt): DrawingGroup.bringForward method in the Node.js TypeScript API: Move the group forward one step. Includes the syntax and a TypeScript example.
- [DrawingGroup.bringToFront Method](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/bringtofront-method/llms-full.txt): DrawingGroup.bringToFront method in the TX Sheet Control TypeScript API for Node.js: Move the group to the front. Includes the syntax and a TypeScript example.
- [DrawingGroup.copyTo Method](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/copyto-method/llms-full.txt): DrawingGroup.copyTo method in the TX Sheet Control TypeScript API for Node.js: Copy members and group membership to another anchor.
- [DrawingGroup.id Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/id-property/llms-full.txt): DrawingGroup.id property in the TX Sheet Control TypeScript API for Node.js, with its syntax, its type string and a TypeScript example.
- [DrawingGroup.members Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/members-property/llms-full.txt): DrawingGroup.members property in the TX Sheet Control TypeScript API for Node.js, with its type Drawing[] and a TypeScript example.
- [DrawingGroup.moveTo Method](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/moveto-method/llms-full.txt): DrawingGroup.moveTo method in the TX Sheet Control TypeScript API for Node.js: Move all members while preserving relative positions.
- [DrawingGroup.remove Method](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/remove-method/llms-full.txt): DrawingGroup.remove method in the TX Sheet Control TypeScript API for Node.js: Delete all members. Includes the syntax and a TypeScript example.
- [DrawingGroup.resize Method](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/resize-method/llms-full.txt): DrawingGroup.resize method in the TX Sheet Control TypeScript API for Node.js: Scale positions and sizes within group bounds.
- [DrawingGroup.rotate Method](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/rotate-method/llms-full.txt): DrawingGroup.rotate method in the TX Sheet Control TypeScript API for Node.js: Rotate group members around their shared center by an angle in degrees.
- [DrawingGroup.sendBackward Method](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/sendbackward-method/llms-full.txt): DrawingGroup.sendBackward method in the Node.js TypeScript API: Move the group backward one step. Includes the syntax and a TypeScript example.
- [DrawingGroup.sendToBack Method](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/sendtoback-method/llms-full.txt): DrawingGroup.sendToBack method in the TX Sheet Control TypeScript API for Node.js: Move the group to the back. Includes the syntax and a TypeScript example.
- [DrawingGroup.sheet Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/sheet-property/llms-full.txt): DrawingGroup.sheet property in the TX Sheet Control TypeScript API for Node.js, with its type Worksheet and a TypeScript example.
- [DrawingGroup.size Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/size-property/llms-full.txt): DrawingGroup.size property in the TX Sheet Control TypeScript API for Node.js, with its syntax, its type Size and a TypeScript example.
- [DrawingGroup.ungroup Method](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/ungroup-method/llms-full.txt): DrawingGroup.ungroup method in the Node.js TypeScript API: Remove grouping and return member handles. Includes the syntax and a TypeScript example.

---

## Nearby

- **Previous:** [DrawingCollection.addBarcode Method](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawingcollection/addbarcode-method/llms-full.txt)
- **Next:** [DrawingGroup.bringForward Method](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/nodejs/drawinggroup/bringforward-method/llms-full.txt)
