BoundedValue

Constructor

BoundedValue <id> (double min, double max, double init_val)

Action

Keeps a value within the specified range.

Predefined children

min, max, input, result

Example


use core
use base
use gui

_main_
Component root {
  Frame f ("myFrame", 0, 0, 500, 500)
  FillColor _ (0, 0, 0)
  Text unbounded (50, 50, "")
  Text bounded (50, 150, "")
  BoundedValue bv (0, 500, 0)
  f.width => bv.max
  f.move.x => bv.input, unbounded.text
  bv.result => bounded.text
}

run root
run syshook