Window

A titled frame: a header with a title, and a content area below it. Useful as a dialog or a panel that needs a caption.

Group: Basic · Default size: 220 × 160 · Style parts: Main, Header, Body

A dropped Window: a grey header bar with the title Window, and nothing drawn below it.
A Window as it is dropped: a header, and a body the colour of the screen.
The Window settings section: Title Settings, Header height 44.
Its settings, set as the example below sets them.
SettingDefaultWhat it does
TitleWindowThe text in the header. Leave it blank and no title label is created at all.
Header height00 keeps LVGL's own height, which is 65 pixels.

A window is two boxes, and each is a part you can style, under Style settings → Part:

What you put in a window is placed in its body: under the header and inside the body's padding. The canvas draws it there, and the align buttons and a widget dropped from the palette go by that room.

Children go into the content area, not onto the window itself - anything parented to the window directly would draw over the title bar. The generated code reflects that: lv_win_get_content() is the parent for everything you drop inside.

Example: a titled settings box

  1. Drag a Window onto the screen; give it X 30, Y 20, Width 260 and Height 200. Under Window settings set Title to Settings and Header height to 44.
  2. Open Style settings and set Part to Header. Under Background set Color to #1E3A8A, and under Text set Color to #FFFFFF.
  3. Drop two Switches into the window, one under the other, each with a Label beside it: Sound and Vibrate. They go into its body, inside the body’s padding.
A window with a dark blue header bar titled Settings in white, and two switches labelled Sound and Vibrate below it.
The window with a coloured header.
Style settings with Part set to Header and the Background group open: Color #1E3A8A marked as changed.
The header is a part of its own.