# WaynesFrame class
{: .no_toc }

A rectangular container control whose entire area is painted with a configurable [**BackgroundFill**](#backgroundfill). Used to group other controls on a [**WaynesForm**](/tB/Packages/CustomControls/WaynesForm/index.md), with the same layout / sizing members as any other custom control.

The default fill is a solid mid-grey ([**WAYNESCOLOR_GREY**](#) --- `&H808080`); change it by accessing the **Fill.ColorPoints** collection.

```tb check_build inherits=WaynesForm
Sub New()
    Frame1.BackgroundFill.ColorPoints.SetSolidColor vbWhite
End Sub
```

> [!WARNING] BETA 1045
> A frame is never drawn again once its form is shown: a property set from then on --- its [**BackgroundFill**](#backgroundfill), say --- changes the property and nothing on the screen, and no error is raised. A value set in the form's `Sub New`, as above, is drawn, because the frame has not been drawn yet. The frame never keeps the [**CustomControlContext**](/tB/Packages/CustomControls/Framework/CustomControlContext.md) it is given, which the package's other controls use to ask for a repaint. To show a changing area, use a [**WaynesLabel**](/tB/Packages/CustomControls/WaynesLabel.md) with an empty caption, whose **BackgroundFill** is drawn as it is set.

Frames work well as containers for [**Dock**](/tB/Packages/CustomControls/Enumerations/DockMode.md)-positioned children. Set the frame's own **Dock** to **tbDockFill** so it claims the form's body, then dock its children to **tbDockTop** / **tbDockLeft** / **tbDockFill** / etc. --- the docking calculation traverses the container tree, so children dock to the frame's client area rather than to the form. The order in which the children are added still determines which edges they claim first.

## Properties

### Anchors
{: .no_toc }

Which sides of the control are attached to its container during resize. [**Anchors**](/tB/Packages/CustomControls/Styles/Anchors.md). Inherited.

### BackgroundFill
{: .no_toc }

The [**Fill**](/tB/Packages/CustomControls/Styles/Fill.md) that paints the frame's entire client area.

### Dock
{: .no_toc }

How the control is docked inside its container. A member of [**DockMode**](/tB/Packages/CustomControls/Enumerations/DockMode.md). Inherited. Default: **tbDockNone**.

### Height
{: .no_toc }

The control's height in pixels. [**PixelCount**](/tB/Packages/CustomControls/Enumerations/PixelCount.md). Inherited.

### Left
{: .no_toc }

The horizontal offset of the control's left edge from its container, in pixels. [**PixelCount**](/tB/Packages/CustomControls/Enumerations/PixelCount.md). Inherited.

### Name
{: .no_toc }

The unique design-time name of the control on its parent form. **String**. Inherited.

### Top
{: .no_toc }

The vertical offset of the control's top edge from its container, in pixels. [**PixelCount**](/tB/Packages/CustomControls/Enumerations/PixelCount.md). Inherited.

### Visible
{: .no_toc }

Whether the control is currently displayed. **Boolean**. Inherited. Default: **True**.

### Width
{: .no_toc }

The control's width in pixels. [**PixelCount**](/tB/Packages/CustomControls/Enumerations/PixelCount.md). Inherited.
