3.3.3 Panels
3.3.3.1 HPanel
3.3.3.2 VPanel
3.3.3.3 Group  Panel
3.3.3.4 Tabs  Panel
On this page:
HPanel
HPanel.Style
HPanel.Style.border
HPanel.Style.vscroll
HPanel.Style.hscroll
HPanel.Style.auto_  vscroll
HPanel.Style.auto_  hscroll
HPanel.Style.hide_  vscroll
HPanel.Style.hide_  hscroll

image

class

class gui.HPanel():

  implements WindowChildView

  constructor (

    ~align: align :: ObsOrValue.of(View.Alignment) = [#'center, #'center],

    ~styles: styles :: ObsOrValue.of(List.of(HPanel.Style)) = [],

    ~enable: enable :: ObsOrValue.of(Boolean) = #true,

    ~spacing: spacing :: ObsOrValue.of(View.SpacingInt) = 0,

    ~margin: margin :: ObsOrValue.of(View.Margin) = [0, 0],

    ~min_size: min_size :: ObsOrValue.of(View.Size) = [#false, #false],

    ~stretch: stretch :: ObsOrValue.of(View.Stretch) = [#true, #true],

    ~window_callbacks: window_callbacks :: maybe(WindowCallbacks) = #false,

    child :: ObsOrValue.of(WindowChildView && !WindowView),

    ...

  )

Creates a panel that arranges child views horizontally.

A panel style option (the same for horizontal and vertical panels):

  • #'border: Draw a thin border around the panel (in which case the client size of the panel may be less than its total size).

  • #'hscroll: The panel includes a horizontal scrollbar, and the panel’s own width is not constrained by the widths of its children.

  • #'vscroll: The panel includes a vertical scrollbar, and the panel’s own height is not constrained by the heights of its children.

  • #'auto_hscroll: Like #'hscroll, but the horizontal scrollbar disappears when no horizontal scrolling is needed.

  • #'auto_vscroll: Like #'vscroll, but the horizontal scrollbar disappears when no horizontal scrolling is needed.

  • #'hide_hscroll: Like #'auto_hscroll, but the horizontal scrollbar is not made visible, even when horizontal scrolling is possible.

  • #'hide_vscroll: Like #'auto_vscroll, but the vertical scrollbar is not made visible, even when vertical scrolling is possible.