3.3.5 Controls
3.3.5.1 Button
3.3.5.2 Checkbox
3.3.5.3 Choice
3.3.5.4 Radio  Choice
3.3.5.5 List  Choice
3.3.5.6 Table
3.3.5.7 Slider
3.3.5.8 Progress
3.3.5.9 Input
3.3.5.10 Label
3.3.5.11 Image
3.3.5.12 Spacer

image

class

class gui.Label():

  implements WindowChildView

  constructor (

    label :: ObsOrValue.of(View.LabelString),

    ~color: color :: ObsOrValue.of(maybe(Color)) = #false,

    ~font: font :: draw.Font = View.normal_control_font,

    ~style: style :: List.of(Progress.Style) = [#'horizontal],

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

    ~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

  )

 

property

property (lbl :: gui.Label).at_label :: Obs.of(View.LabelString)

Creates a text label. See View.LabelString for information about keyboard mnemonics in the label argument.

The Label.at_label property returns an observable that is updated whenever the label’s state changes through label as an observable.

See Geometry Management for information about ~margin, ~min_size, and ~stretch.

The ~window_callbacks argument configures callbacks that are common to all WindowChildViews. See WindowCallbacks for more information.