# DesignerFactory class
{: .no_toc }

The interface an addin implements to make its designers. The addin passes an object of its own class to [**Designers.Register**](/tB/Packages/tbIDE/Designers.md#register), and the IDE calls [**CreateDesigner**](#createdesigner) on it each time it opens a file in that designer.

```tb check_build
Private Class HexFactory
    Implements DesignerFactory
    Private Owner As Object

    Public Sub New(ByVal Owner As Object)
        Set Me.Owner = Owner
    End Sub

    Private Function DesignerFactory_CreateDesigner() As Designer
        Return New HexDesigner(Owner)
    End Function
End Class
```

A factory usually holds the addin's own object, as here, and hands it to each designer it makes, so that the designer can reach the [**Host**](/tB/Packages/tbIDE/Host.md) and the addin's settings. Write `Set Me.Owner = Owner` when the parameter has the field's name: without `Me.`, the parameter is set to itself and the field stays **Nothing**.

* TOC
{:toc}

## Methods

### CreateDesigner
{: .no_toc }

Returns a new designer for one tab. The IDE calls it as it opens a file in the designer, and again for each designer tab that is open when the compiler restarts.

Syntax: *factory*.**CreateDesigner**() **As** [**Designer**](/tB/Packages/tbIDE/Designer.md)

Return a new object each time: each tab has a designer of its own.

## See Also

- [Designers.Register](/tB/Packages/tbIDE/Designers.md#register) method
- [Designer](/tB/Packages/tbIDE/Designer.md) class
