Numeric Editbox

Version (16,7 ko) par Sean
This class provides a numeric editbox uicontrol.
607 téléchargements
Mise à jour 1 sept. 2016

Afficher la licence

The typical MATLAB uicontrol edit box allows for any string to be input
by the user. Often times, we want numeric values only and have to safe
guard against this in the edit box callback:

function editbox_callback(src,evt)
if isnan(str2double(src.Value))
warning('Not a string')
src.Value = 1

This class saves the effort of checking this and provides a few
additional features as well.

In addition to the standard uicontrol properties used by an edit box, there are
four additional ones:

* Value: The numeric value of the edit box.
* RoundFractionalValues: If true, the numericEditbox only accepts integers.
* Limits: Minimum and Maximum acceptable values.
* ValueChangedFcn: Callback that fires when a valid new value is accepted.
There is also a 'ValueChanged' event that can be listened for when an
acceptable input changes the 'Value'.

Citation pour cette source

Sean (2024). Numeric Editbox (, MATLAB Central File Exchange. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2014b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
En savoir plus sur Migrate GUIDE Apps dans Help Center et MATLAB Answers

Community Treasure Hunt

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

Start Hunting!


Version Publié le Notes de version

Updated license

Correct Version