matlab_settings_gui

バージョン 1.1.0 (52.3 KB) 作成者: Abel Szkalisity
A small framework to simply ask input from users in a GUI.
ダウンロード: 86
更新 2022/7/29

Please see the readme on github and the code's documentation for detailed descriptions.

*****************************
A small framework to simply ask input from users in a GUI. It can be considered as an extension to the built-in inputdlg of Matlab as it supports not only text input but many other types as well.

This toolbox was designed to simplify parameter inquiries from users. It aims to eliminate the need of creating separate GUIs with customized layouts each and every time one needs to ask for parameters from users. Instead, by a unified parameter description interface it automatically generates the required GUI.

Usage

The simplest usage of the toolbox is via the Settings_GUI function (GUIDE figure). You only need to create the appropriate parameter description variable (paramarray, see description in the doc of generateUIControls.m) and a modal figure is automatically created (i.e. it blocks the running of other code until the user enters the information). Once the user filled in the values and click OK the gui returns with a cellarray containing the specified value (for the exact format please check the documentation of fetchUIControlValues.m)

It is possible to provide a check function handle to the GUI so that it only accepts values that pass through the evaluation carried out by this check function.

Example

Define a parameter structure and then call the Settings_GUI file

S = {...
struct('name','An enum','type','enum','values',{{'Option #1','Option #2','Option #3'}});...
struct('name','A number','type','int','default',5);...
struct('name','A string','type','str','default','Sample text');...
struct('name','Your favourite color','type','colorPicker','default',[0 1 0.8]);...
};

answers = Settings_GUI(S)

Acknowledgement:

Thanks a lot for the scrollable GUI panel idea from:
https://undocumentedmatlab.com/blog/scrollable-gui-panels

引用

Abel Szkalisity (2024). matlab_settings_gui (https://github.com/szkabel/matlab_settings_gui), GitHub. 取得済み .

MATLAB リリースの互換性
作成: R2019a
R2007a 以降のリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

GitHub の既定のブランチを使用するバージョンはダウンロードできません

バージョン 公開済み リリース ノート
1.1.0

Added functionality for dynamic settings. Work in progress, but basic functionalities are demonstrated in demo.m

1.0.2

Adding possibility for number specifications (such as to restrict integers, limits)

1.0.1

Added support for file and directory selection.

1.0.0

この GitHub アドオンでの問題を表示または報告するには、GitHub リポジトリにアクセスしてください。
この GitHub アドオンでの問題を表示または報告するには、GitHub リポジトリにアクセスしてください。