Change the name of cancel button in waitbar

1 次查看(过去 30 天)
The term "cancel" is different than "stop". For me, "cancel" means "forget whole the calculations", while "stop" means "save the calculations up to now".
Is it possible to customize the string of "cancel button"? I'd like to change its name to "stop".
Thanks a lot

采纳的回答

Walter Roberson
Walter Roberson 2013-6-6
If you are adding the cancel button by using the CreateCancelBtn option of waitbar(), then record the handle that is output from waitbar(), and then...
t = get(WaitBarHandleGoesHere, 'children');
set(t(2), 'String', 'Stop')
  3 个评论
Frank Madrid
Frank Madrid 2018-7-2
In Matlab 9.5.0.882065 (R2018b), I needed to replace
set(t(2), 'String', 'Stop')
with
set(t(1), 'String', 'Stop')
to achieve the same functionality.
engdancili
engdancili 2021-1-8
And to be more compact just write
set(f.Children(1), 'String', 'Stop')
where f is the waitbar handle

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Dialog Boxes 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by