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

Hull and Outfitting

Intelligent Positioning and Resizing

  • Last UpdatedNov 12, 2025
  • 1 minute read

So far we have considered the static layout of the form, but often our forms need to be resized by the user at run-time.

Most gadgets have an ANCHOR attributes and a few support the DOCK attribute. This allows you to have more than one resizable gadget on the same form and to have predictable and potentially complex resize behavior.

Note: The recommended way to build intelligent resizable forms is to initially design the form as a simple (non-resizable) dialog, and get the static layout correct. Then apply the ANCHOR and DOCK attributes to the static gadgets to produce the desired dynamic resize effect.

The DOCK and ANCHOR attributes are mutually exclusive. Setting the DOCK attribute resets the ANCHOR to the default; setting the ANCHOR attribute resets DOCK to none.

You can set these attributes only when you define the gadget: you cannot change the setting after the exit from form setup. Thus you are not allowed to change the resize behavior at run-time.

ALPHA and VIEW gadgets do not support DOCK or ANCHOR attributes. However, these gadgets expand fully to fit their containers. VIEW and ALPHA gadgets should always be placed in their own frame, with no other gadgets. Use the frame’s DOCK and ANCHOR attributes to get the behavior you desire.

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