A useful Form Constructor

LuaForm makes creating form objects easier. You feed LuaForm with a table; the array-like part of the table contains the controls, and the map-like part contains any properties you wish to assign to the control. If there is only one control to be added, then it's assumed that we want it to fill the whole client area of the form.

> txt = RichTextBox()
> f = LuaForm{txt;Text="hello"}
> f:Show()

If multiple controls are added, then one can provide their dock styles:

> txt = RichTextBox()
> list = ListBox()
> f = LuaForm{'Fill',txt,'Left',list; Text = "Test!"}
> f:Show()