reference
labkit.app.layout.button
Add a push button with one explicit pressed callback.
Syntax
node = labkit.app.layout.button(id, label, onPressed, Name=Value)Description
Declares a semantic push button without creating a native component.
Inputs
id- Unique MATLAB identifier for the layout target.
label- Nonempty text displayed on the button.
onPressed- Scalar function handle with the fixed callback state = onPressed(state,context).
Options
BusyMessage- Status text while the action runs. Default: "".
Enabled- Initial logical enabled state. Default: true.
Tooltip- Nonempty hover text explaining the action's scientific or workflow effect. Default: label.
Outputs
node- Immutable internal layout node accepted by layout containers.
Errors
Throws labkit:app:contract:* for invalid IDs, options, or handlers.
Typical Call
node = labkit.app.layout.button("run", "Run", @runAnalysis, ...
Tooltip="Compute the current analysis from the selected inputs.");Related APIs
labkit.app.layout.workbench— Assemble controls and a central workspace into the root layout.labkit.app.CallbackContext— Provide declared App-neutral runtime capabilities.labkit.app.layout.dataTable— Add a tabular data display with optional editing and selection.labkit.app.layout.field— Add a text, numeric, choice, or logical input field.labkit.app.layout.fileList— Add file selection and portable-source controls.labkit.app.layout.group— Arrange related child elements without a titled boundary.labkit.app.layout.logPanel— Add a text display for App log messages.labkit.app.layout.plotArea— Add one or more axes rendered by an App-owned renderer.
Source
This page is generated from the MATLAB help text in +labkit/+app/+layout/button.m.