Spinners (WaitIcon Update)
The WaitIcon class (also known as a "Spinner" or "Throbber") has been updated and now supports
multiple modern types and configuration options.
Available spinner types:
-
default – A subtle, pastel-colored bar spinner with 12 lines, optimized for all backgrounds.
This is the default.
-
classic – The well-known spinning ring (arc/loop) loader.
-
ripple – Material Design-style double-ripple spinner (expanding circles).
How to select spinner type and size:
$waitIcon = new WaitIcon($this);
$waitIcon->SpinnerType = 'ripple'; // or 'classic', 'default'
$waitIcon->Width = '2em'; // or '24px', '3rem', etc.
$waitIcon->Height = '2em'; // defaults to '1.5em'
You can set a DefaultWaitIcon for your form; all Ajax actions will use it by default.
You can also set null if you want to hide the spinner for a specific Ajax action,
or pass a different WaitIcon instance as needed.
Make sure you also render your WaitIcon on the page.
Note: Some examples use an artificial delay (e.g. sleep()) to make the spinner visible during the Ajax request.
Important: Don’t forget to include waiticon-spinner.css in your HTML header for proper display.
Summary: The WaitIcon is now modern and flexible, with multiple display types and property-based sizing.