The new FXSpring widget can be used for fixed-proportion layouts inside an FXHorizontalFrame or FXVerticalFrame. FXSpring widgets can be given different lengths, and when piled side by side inside an FXHorizontalFrame the different springs stretch or shrink proportional to their given lengths. For example, consider the following layout (from the ratio example program included in the FOX 1.2 source code distribution):

The springs (labelled 1, 2 and 3) were created with code similar to the following:
new FXSpring(horizontalFrame, LAYOUT_FILL_X|LAYOUT_FILL_Y, 1, 0); new FXSpring(horizontalFrame, LAYOUT_FILL_X|LAYOUT_FILL_Y, 2, 0); new FXSpring(horizontalFrame, LAYOUT_FILL_X|LAYOUT_FILL_Y, 3, 0); |
The third and fourth arguments to FXSpring's constructor are the spring's relative width and height, respectively. Note that a relative width (or height) of zero is a special case, for which the spring will calculate its default size normally (i.e. as a normal FXPacker would). When this example window is stretched such that its width doubles, the result is that the three springs maintain the same relative widths:

Finally, note that since FXSpring is derived from FXPacker, it is just a normal layout manager and can contain many child widgets.