Reusable Parts vs Webpage and Forms

Reusable parts are intended to be self-contained units that can be used wherever they are placed, and this presents an interesting problem when trying to make a reusable part that will resize to its content.

For panels and other composite controls, the Sizing property of the layout item can be set to ContentHeight etc., and all will work as expected. However, the layout item for a reusable part is actually defined in the place that uses the part, and having to define sizing there somewhat defeats the purpose of having a self-contained part.

Figure 11 – Sizing a reusable part

To get round this issue, content based sizing can be defined for the layout manager itself. This allows the layout for a reusable part to define the sizing of the part when it's used.