Skip to main content

InputGroup

Wolfram Kernel
Execution environment
Notebook`Kernel`Inputs`
Context
InputGroup[events_List | _Association, opts___] _EventObject

groups different event-generators such as InputRange, InputButton or in general EventObject into a new EventObject

info

Please consider to read the full guide event-generators

Options

"Label"

A text label for an element

"Description"

A description label for an element

Event generation

Every-time user acts on an inner event-view from a group events, it will fire an event and send the data from all event objects keeping the original structure

Association

group = InputGroup[<|
"left"->InputRange[0, 10, 1, "Label"->"Range 1"],
"right"->InputRange[0, 10, 1, "Label"->"Range 2"]
|>]
EventHandler[group, Print];

On each update it generates the data for the handler function in a form

<|"left"->5, "right"->7|>

Arrays

group = InputGroup[{
InputRange[0, 10, 1, "Label"->"Range 1"],
InputRange[0, 10, 1, "Label"->"Range 2"],
InputText["Hi"]
}]
EventHandler[group, Print];

the data provided to a handler function Print will look like

{5, 7, "Hi"}