image thumbnail

bindValue

version 1.0.1 (1.65 KB) by Hyeokjin Jho
This function allows data binding of values between property in source and view objects.

27 Downloads

Updated 26 Apr 2021

View License

This function allows data binding of values between property in source and view objects.

Arguments

modelObject : Object which one of its property will be bound. Must be subclass of matlab.mixin.SetGet
propname : Name of property of modelObject to bind
viewObjects : UI object which its value will be bound. can be multiple. Should have property 'Value'
i.e. togglebutton, checkbox, numeric editfield or gauge

Example

bindValue(model,'threshold',thresholdEditField);
% Binds model.threshold with thresholdEditField.Value

bindValue(model,'ROI.xmin',ROI_x_editfield);
% Binds model.ROI.xmin with ROI_x_editfield.Value

Cite As

Hyeokjin Jho (2022). bindValue (https://www.mathworks.com/matlabcentral/fileexchange/90885-bindvalue), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2021a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!