Controls
A control is something you see and use in a window: a button, some text, a text box, or a container that lays other controls out.
Windows applications are experimental in Otter 1.0 (release scope matrix): they work and are tested, but details may change before they are fully supported. They need Windows: on macOS and Linux, window programs and otter desktop stop with a clear message. Most window programs can also be compiled into a web application with otter web, which is fully supported and runs everywhere.
You create a control with create, give it a name, set its properties with of, put it inside a window or container, and react to what the person does with when.
Otter
create window into app
title of app is "Hello"
create button into helloButton
text of helloButton is "Say hello"
put helloButton in app
when helloButton is clicked
say "Hello!"
.
show app
Controls in Windows applications
These controls are available to programs that create windows (otter run app.ot). Each has its own reference page:
window: the application window
button, primary button, secondary button, danger button
text: a line of text
text box: text the person can edit
heading: a title
card: a raised container
row: children side by side
column: children stacked
panel: a plain container
grid: a grid container
scroll: a scrolling container
Controls in web applications
Programs compiled with otter web are described differently - with is a and with - and have a wider set of resources (page, card, badge, link, image, checkbox, dropdown, slider, table and more). See Web applications for those.
Some controls people expect, such as menus, tabs, dialogs and file pickers, are not part of the Windows control set yet. This section documents what exists today.
Layout
Events
Web applications