Screen Layouts
Summary
The five screen layouts that the 2Wee client can render: Menu, List, Card, HeaderLines, and Grid.
Purpose
Every ScreenContract has a layout field that determines how the client renders it. The server chooses the layout. The client does not decide.
Menu
Navigation menu with tabs and items.
- Horizontal tab navigation (Left/Right)
- Vertical item navigation (Up/Down)
- Enter opens the selected item
- The
top_leftandtop_rightfields display app name and user info
┌──────────────────────────────────────────────┐
│ 2Wee Demo Server admin 10-03-26│
├──────────────────────────────────────────────┤
│ [Sales] Purchasing Warehouse Financial │
├──────────────────────────────────────────────┤
│ > Customers │
│ Sales Orders │
│ Posted Invoices │
└──────────────────────────────────────────────┘List
Full-screen scrollable table for browsing records.
- Up/Down to move between rows
- Enter opens the selected record
- Type-to-search: any printable character starts filtering
- Home/End jumps to first/last row
- PageUp/PageDown scrolls
┌─ Customers ──────────────────────────────────────────────┐
│ No. Name Balance │
│ ───────── ───────────────────────────── ──────────────── │
│ 10000 The Cannon Group 45,000.00 │
│ 20000 Selangorian Ltd. 12,500.00 │
│ 30000 John Haddock Insurance 0.00 │
└──────────────────────────────────────────────────────────┘Card
Single-record form with sections and fields.
- Fields organized in sections
- Sections positioned on a 2D grid using
columnandrow_group - Tab/arrow navigation between fields
- Select mode and edit mode for each field
Ctrl+Ssaves,Escreturns to the list
┌─ General ─────────────────────┐ ┌─ Communication ────────────────┐
│ No............. [10000 ]│ │ Phone........ [+45 70 10 20 30]│
│ Name........... [Cannon Group]│ │ E-Mail....... [ap@cannon.test ]│
│ Balance (LCY).. [45,000.00 ]│ │ Web.......... [www.cannon.test]│
└───────────────────────────────┘ └────────────────────────────────┘Section layout
row_group 0: [column 0: General] [column 1: Communication]
row_group 1: [column 0: Posting] [column 1: Payments]Dot-padded labels
Labels are left-aligned, followed by dots, then the input box. All input boxes in a section start at the same X-coordinate:
Customer No....... [10000 ]
Name.............. [The Cannon Group ]
Balance (LCY)..... [45,000.00 ]HeaderLines
A Card with an attached editable grid for line items. Used for documents like Sales Orders and Purchase Orders.
How it works
- Card opens normally — all header fields visible
Ctrl+Lopens the lines overlay (editable grid drawn on top of the card's lower portion)- Grid has its own cell-level focus and navigation
Escin the grid closes the overlay and returns to card navigation- Ctrl+S saves both header fields and grid changes together
lines_overlay_pct
Controls how much of the screen the grid covers:
| Value | Result |
|---|---|
0 | Not used (for Card/List layouts) |
0–100 | Overlay covers this percentage of the body |
| Default | 50 |
If lines_open is set on the ScreenContract, the overlay opens automatically when the screen loads. Otherwise the user opens it with Ctrl+L.
For full-screen editable grids without a card, use the Grid layout instead.
Grid
A full-screen editable grid for batch data entry. Used for payment journals, general ledger posting, and other tabular workflows.
How it works
- Grid is the primary content — no card, no overlay toggle
- All grid navigation and editing works the same as HeaderLines grids
Escgoes straight back to the previous screenCtrl+Ssaves the grid dataCtrl+Aopens the action picker (e.g., Post Journal, Export)- Optional totals footer shows server-computed summary values
┌─ Banking Journal ────────────────────────────────────────────────────────┐
│ Posting Date Document Type Document No. Acc. Type Account No. Desc… │
│ ─────────── ───────────── ──────────── ───────── ─────────── ────── │
│ 16-03-2026 Payment PAY-001 Customer 10000 Acme… │
│ 16-03-2026 Invoice INV-100 Customer 20000 Sela… │
│ │
│ Balance: 700.00 Total Balance: 700.00 │
├──────────────────────────────────────────────────────────────────────┤
│ Ctrl+S Save F3 Insert F4 Delete Ctrl+A Actions Esc Close │
└──────────────────────────────────────────────────────────────────────┘Totals footer
The server can include a totals array on the ScreenContract with label+value pairs. These are rendered right-aligned in a row between the grid and the bottom bar.