In general (not just in Racket) the styling is more difficult in a cross platform gui.
Since a Racket GUI program needs to run on both macOS, Linux and Windows
and still look "native" - it is usually a good idea to keep the default appearance of
most elements. Also one must accept that guis aren't as flexible as html/css.
The upside is that using standard elements work with custom themes used
in the OS. Screen readers for blind also work with standard elements.
Also when (strictly hypothetically of course) some OS changes buttons from
squares to circles, then nothing in your code needs changing.
However, here is where to look for different knobs to tweak:
Arranging
========
To place gui elements in a row: use horizontal-pane% or horizontal-panel%
To place gui elements in a column: use vertical-pane% or vertical-panel%
Use panels if you need to respond to events.
These elements support alignments and borders.
For custom placement in a row, make a subclass of horizontal-panel%.
For custom placement in a column, make a subclass of vertical-panel%.
For custom placement in a 2d-area, make a subclass of panel%.
Use vertical-pane% for left alignment.
Study:
https://docs.racket-lang.org/gui/Windowing_Classes.html?q=guiBorders
======
For system borders use the a some kind of pane/panel to put your element in.
Then turn on the border of the pane/panel. You can also add padding by
putting an element inside a pane/panel.
Custom borders are tricky.
Canvas
======
For a canvas you have full control over colors and contents - but the downside
is that you need to draw everything yourself.
Basic Elements
============
The most basic elements: mesages (labels), buttons, check boxes, sliders etc
are here:
https://docs.racket-lang.org/gui/control___.html?q=guiCompound Elements / OS Elements
============================
From the basic elements one can build more complicated elements.
Look around in the documentation for these. If you can't find
an element ask around - chances are that you are not the first
to need a certain type of element.
Some OS level elements such as "pick a file" dialogs finder:put-file and
finder:get-file are found in `framework` (not in `racket/gui`).
General Advice
============
The gui system uses classes and objects. If you need to change the
behaviour of certain elements, say, a button. One must make a
subclass, say, my-button%, that overrides/replaces the default
behaviour. Then that class must be instantiated.
Look in the 7gui repo for examples of this.
Blogs
====
Alex Harsányi has written many blog posts on how to use the Racket gui.
https://racket-stories.com/from/327Other gui related blog posts:
https://racket-stories.com/from/248Video in Racket guis:
https://www.youtube.com/watch?v=yo6wVXS6dkU/Jens Axel