how do i make 'Interpreter', 'none' work inside the waitbar text?
35 ビュー (過去 30 日間)
古いコメントを表示
hi
what is the equivalent for " 'Interpreter', 'none' " in the 'waitbar' framework?
thanks a lot,
matty
2 件のコメント
Guillaume
2016 年 4 月 14 日
@Stefano, please ask your own question. That way when it is answered you can accept the answer.
Note that the 2016 answer would not apply to the 2013 version of matlab
採用された回答
Max Snippe
2017 年 12 月 30 日
Instead of searching for the object one might change the interpreter directly with the 'dot-notation' (available since R2014b) as in the following MWE:
wb = waitbar(0/10,'My_waitbar_string_with_underscores');
wb.Children.Title.Interpreter = 'none';
for i = 1:10
waitbar(i/10,wb,'My_waitbar_string_with_underscores');
pause(1);
end
delete(wb);
Note that if you use a cancel button in the waitbar, the number of children of the object changes and one might have to change
wb.Children.Title.Interpreter
to
wb.Children(2).Title.Interpreter
3 件のコメント
Adam Danz
2024 年 1 月 29 日
Here's another version that doesn't rely on child order
wb = waitbar(__);
set(gca(wb).Title,'Interpreter','none')
その他の回答 (2 件)
Orion
2016 年 4 月 14 日
Hi,
Here's one way to do it
% Create a classic waitbar
h = waitbar(0,'my_name');
% change the interpreter of the String
myString = findall(h,'String','my_name');
set(myString,'Interpreter','none')
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Dialog Boxes についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!