i want to copy the data of the edit text button in my gui and use it in other push button can i do that ?
1 回表示 (過去 30 日間)
古いコメントを表示
[filename]=uigetfile({'*.txt'},'FILE Selector');
Path=filename;
text=fileread(Path);
set(handles.edit2,'string',text);
0 件のコメント
回答 (2 件)
Image Analyst
2015 年 6 月 1 日
All callbacks have access to any properties of any widget on your user interface. So, in the callback of your other push button, simply do
editFieldText = get(handles.edit2, 'String');
Now that callback can use editFieldText as a string in anyway that it wants.
If you need that edit field string in a custom function that you wrote, instead of a callback, then you need to pass in the handles structure.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Interactive Control and Callbacks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!