Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Hull and Outfitting

Useful Form Layout Quick Checklist

  • Last UpdatedFeb 08, 2023
  • 2 minute read

The layout for complex dynamic forms can be difficult to get right, so the simpler the code the easier it is to adjust.

  1. It is rarely necessary to set the form width and height explicitly.

  2. Use VarChars - variable spaced text layout mode (current default is FixChars). This gives more accurate layout and where text is explicit for a gadget it should remove the need to use TagWidth (except where specific alignment of a set of gadgets is needed). Also avoids need to use 'width' for buttons, toggles.

  3. Use of 'path down' with 'vdist 0,2' removes the need to keep using ‘at ymax + 0.2' etc

  4. Use of 'path right' with 'hdist 1.0' removes the need to keep using 'at xmax + 1.0'

  5. When using 'anchor' for a gadget the default setting is 'Top + Left' so no need to say anything if this is all you need.

  6. Minimize the use of literal values for co-ordinate positions and lengths whenever possible - use relative layout, which makes it easier to adjust the form later, for example,

    frame .page2 Panel anchor all at xmin.page1 width.page1

  7. It is not usually necessary to set the frame width and height, except for specific alignment purposes

  8. You can use the 'form - size' and ‘.gad - size’ constructs to right align gadgets in a dynamic frame, for example,

    button .nextPage linklabel 'Next' anchor bottom + right at xmax form-size ymin

  9. There are some instances with layout of docking dialogs that sometimes the calculated frame size is slightly smaller than actual, it is always useful to compare with a simple dialog (with and without 'resize' set).

Related Links
TitleResults for “How to create a CRG?”Also Available in