Layout Test Program  FOX Toolkit

By Bill Baxter

This is a small example program for the FOX toolkit that demonstrates the various layout flags you can use to create widgets.

Download the source code and an example Win32 exe:
    foxlayout-15-Feb-04.zip

The code was built and tested on WinXP with MSVC 6.0, and FOX 1.1.46.
Should work with most any FOX 1.1.x version,  but not with FOX 1.0.x.

If you have any problems, suggestions, patches  let me know.
Also let me know if you find this useful!

Basically this program lets you interactively play with the various layout flags available. Use it by picking some layout flags with the checkboxes, then clicking on the "Add" button. After you add a button, changing the flags changes the style of the last button added so you can see how different flags affect it. The idea is just to let you play around with the different flags and different composite widgets so you can start to gain an intuitive notion of how to get the layout you're after.

Notes:

  • You may have to manually resize the window at times to get the layout to refresh properly.
  • Some of the checkboxes are disabled. That's because the value of these flags in FOX is actually 0. That is, they don't actually do anything. So that means any of the flags that are showing disabled are actually never necessary to pass in as options.
  • Some flag values in FOX are overloaded, like LAYOUT_SIDE_BOTTOM and LAYOUT_FILL_COLUMN. They have the same numeric value but are used as hints by different containers, so it works out ok.
  • Finally some FOX layout flags are actually a combination of other flags. For instance LAYOUT_SIDE_RIGHT doesn't have a unique value. Instead FOX indicates it by combining LAYOUT_SIDE_LEFT and LAYOUT_SIDE_BOTTOM flags. And that works ok because you're officially not allowed to use two LAYOUT_SIDE_ flags.


If you're interested in my other free code check here.

Finally, a screenshot!

Screenshot of layout test