Sys NonClientAreaStyle

New to Analytica 7.2

SysVar Sys_NonClientAreaStyle

Controls the appearance of the window frames -- the title bar and border, also called the non-client area -- of the windows inside the Analytica main window (diagram windows, Object windows, result windows, and so on). Its value is a NonClientAreaStyle Struct that holds only the settings you override; everything you leave out uses Analytica's built-in Windows 11 style.

This is a user preference, not a model setting. It is stored in your Windows registry, so it applies to every model you open, is not saved with any model, and persists after you exit and restart Analytica. Changes take effect immediately on all open windows.

The most common reason to change it is to make window borders thicker so they are easier to grab when resizing a window:

Sys_NonClientAreaStyle := NonClientAreaStyle(borderWidth: 4)

Set it from the Typescript window, or from a script using EvaluateScript. To restore the built-in style:

Sys_NonClientAreaStyle := Null

Struct NonClientAreaStyle(defaults, borderWidth, borderStyle, ...)

Constructs a window-frame style. Every parameter is optional; members you don't specify are left out of the struct and use the built-in style.

Parameter Values Built-in default Meaning
«defaults» a NonClientAreaStyle Another style whose members are kept unless you override them in this call. Not itself a member. See Changing one setting at a time.
«borderWidth» 1 to 20 1 Thickness of the frame in pixels (at 100% display scaling). The whole frame is a resize handle, so a thicker frame is easier to grab.
«borderStyle» 'Solid', 'Flat', 'Classic' 'Solid' How a frame thicker than 1 pixel is drawn. Solid fills the frame with the border color, so it stands apart from the title bar and from the scroll bars it abuts. Flat fills the frame with the title-bar color and outlines it with the border color, so the frame looks like a continuation of the title bar. Classic is the pre-Windows 11 look (Windows 7, XP): the title bar and frame are one surface in the border color -- light blue unless you give «borderActive» / «borderInactive» -- with a dark outline, a light highlight just inside it, and a dark line around the window contents. The caption text is chosen automatically to be readable on the frame color (white on a dark blue), unless you specify it. An explicit «titleBarActive» or «titleBarInactive» still sets the title bar separately.
«cornerRadius» 0 to 16 8 Radius in pixels of the rounded top corners. 0 gives square corners.
«titleBarHeight» 20 to 64 32 Height of the title bar in pixels.
«titleBarActive», «titleBarInactive» color white, light gray Title bar background, for the active window (the one with the focus) and for the other windows.
«borderActive», «borderInactive» color black, gray (light blues for Classic) Border color: the outline, and the whole frame for Solid and Classic.
«captionTextActive», «captionTextInactive» color black, gray Color of the window title text and the minimize/maximize/close glyphs.
«buttonHoverBg», «buttonPressedBg» color light grays Background of the minimize and maximize buttons when the mouse hovers over or presses them.
«closeHoverBg», «closePressedBg», «closeHoverFg» color red, dark red, white Background and glyph color of the close button when hovered or pressed.

A color can be a color name such as 'LightGreen' or a number such as 0xFF90EE90; see Color parameters. The alpha (transparency) component is ignored; frames are always opaque.

Giving a member as Null removes it, so it reverts to the built-in style. Out-of-range values and unrecognized border styles are errors.

Changing one setting at a time

Structs are immutable, so you can't assign to a single member, e.g., Sys_NonClientAreaStyle->borderWidth := 4 is not allowed. Instead, pass the current style as «defaults» and override just the member you want to change:

Sys_NonClientAreaStyle := NonClientAreaStyle(defaults: Sys_NonClientAreaStyle, borderWidth: 4)

This keeps all your other settings. To remove one setting while keeping the rest, set it to Null:

Sys_NonClientAreaStyle := NonClientAreaStyle(defaults: Sys_NonClientAreaStyle, titleBarActive: Null)

You can read the current settings with the -> member operator, e.g., Sys_NonClientAreaStyle->borderWidth. A member you haven't set is absent (the built-in style applies).

Examples

A thicker, easy-to-grab frame (in the border color, black on the active window):

Sys_NonClientAreaStyle := NonClientAreaStyle(borderWidth: 4)

A modern frame that blends with the title bar, with a thin outline:

Sys_NonClientAreaStyle := NonClientAreaStyle(borderWidth: 5, borderStyle: 'Flat')

A colored frame:

Sys_NonClientAreaStyle := NonClientAreaStyle(borderWidth: 4, borderActive: 'SteelBlue', borderInactive: 'LightGray')

A light green title bar on the active window:

Sys_NonClientAreaStyle := NonClientAreaStyle(titleBarActive: 'LightGreen')

Retro, Windows 7 style (light blue):

Sys_NonClientAreaStyle := NonClientAreaStyle(borderWidth: 4, borderStyle: 'Classic')

Retro, Windows XP style (dark blue, with white caption text):

Sys_NonClientAreaStyle := NonClientAreaStyle(borderWidth: 4, borderStyle: 'Classic', borderActive: 0xFF0054E3, borderInactive: 0xFF7A96DF)

Notes

  • A maximized window has no frame of its own, and a minimized window always keeps a thin border, so these settings mostly affect windows in their normal (restored) state.
  • The setting is saved in the registry as text (the value NonClientAreaStyle under HKEY_CURRENT_USER\Software\Lumina Decision Systems\Analytica). If that text can't be read, Analytica uses the built-in style.
  • It is ignored by ADE and the Analytica Cloud Platform, which have no window frames to draw.
  • There is not yet a setting for this on the Preferences dialog.

History

Introduced in Analytica 7.2 (ER 22557 for border thickness, ER 21938 for colors).

See Also

Comments
Loading comments...