how do you make a GUI editable textbox empty by default?

23 ビュー (過去 30 日間)
Alex Holmstrom
Alex Holmstrom 2019 年 10 月 31 日
回答済み: Bhaskar R 2019 年 10 月 31 日
how do you make a GUI editable textbox empty by default?
I have not entered anything in my box tagged Amount, but a = isempty(handles.Amount) is returning a = 0

回答 (1 件)

Bhaskar R
Bhaskar R 2019 年 10 月 31 日
1) Editable UIControl property need to be empty string i.e delete string(default string is Edit Text) and put the empty string when you place editable UI control onto GUI layout
or
2) In your GUI opening function <filename>_OpeningFcn(hObject, eventdata, handles, varargin) write the statement as
handles.<your_edit_UI_control_tag>.String = '';

カテゴリ

Help Center および File ExchangeFile Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by