MaxGUI variation

Just yesterday I posted about some ‘experiments’ I made with MaxGUI.

In particular ‘autoalignment’ was once thing I like to find native in MaxGUI. So I decided to re-do my own autoalignment version of MaxGUI and make it public.

You can find here the MaxGUI.mod (please make a copy of your version before install mine, build all modules and re-build documentation).

I’ve added 2 commands (auto-highlighted once you rebuild mods+docs)

SetGadgetAlignment (parent,alignment, size)


the first one determines what type of alignment you want for the ‘next’ gadgets you will add: it can be MAXGUI_HORIZONTAL, or MAXGUI_VERTICAL

Size determines the distance from borders of the ‘gadgets’.

DoLayout() is needed to ‘make things happens’: without this command you cant’ see any gadgets at all! It does the ‘magic’ of placing the gadgets in the ‘parent’ selected.

By default the ‘reference parent’ is the latest windows created.

Every CreateGadget commands – now – has ‘default’ parameters: so you can ‘leave blank’ positions or sizes or parent; MaxGUI will try to determine automatically gadget’s dimensions.

This is an example of the default gadget paramets


This is an example of automatic layout

Except CreatePanel command and proxygadgets , every other CreateGadget command has been rewritten to play with Autoalignment feature. I’ve tested it on Windows XP and with FLTK (win32).

Of course consider this MaxGUI variation like an experiment: I can’t guarantee it’s bugfree! It’s is just a proof of concept, and – for sure – I will try to change the autoalignment features in the future.


Another variation I’ve added is AddGadgetItems(gadget,object,select)

This command allow to add – in a faster way – several items to a gadget that support items (like gadgetbox or listbox)

The parameter object can be a string array, a list or a map (in this case only MapKeys are considered).

The select parameter indicates what item must be ‘selected’ in the gadget list.



local_offerevent_note August 20, 2011

account_box degac


One thought on “MaxGUI variation”

Leave a Reply

Your email address will not be published.