Borrar filtros
Borrar filtros

Change the name of cancel button in waitbar

2 visualizaciones (últimos 30 días)
Moritz
Moritz el 6 de Jun. de 2013
Comentada: engdancili el 8 de En. de 2021
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

Respuesta aceptada

Walter Roberson
Walter Roberson el 6 de Jun. de 2013
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 comentarios
Frank Madrid
Frank Madrid el 2 de Jul. de 2018
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 el 8 de En. de 2021
And to be more compact just write
set(f.Children(1), 'String', 'Stop')
where f is the waitbar handle

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Dialog Boxes en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by