![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/189436/image.png)
font control in uimenu objects
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Arabarra
el 23 de Jun. de 2018
Editada: Walter Roberson
el 23 de Jun. de 2018
Hi,
is there some obscure trick to change the fonts in uimenus? I use uimenus to show tabulated data:
name : <foo>
address : <foo>
phone number : <foo>
In two subsequent uimenus I reserve the same amount of spaces before the colon, but as the default font that matlab assigns to uimenu objects does not have a fixed width, my uimenus look horrible, as the colons don't appear aligned... is it possible to find a fix for this?
0 comentarios
Respuesta aceptada
Jan
el 23 de Jun. de 2018
Editada: Jan
el 23 de Jun. de 2018
Pool = {'name : foo', ...
'address : foo', ...
'phone number : foo'};
figure;
menuH = uimenu(gcf, 'Label', 'Your Menu');
h1 = uimenu(menuH, 'Label', ['<HTML><PRE>', Pool{1}]);
h2 = uimenu(menuH, 'Label', ['<HTML><PRE>', Pool{2}]);
h3 = uimenu(menuH, 'Label', ['<HTML><PRE>', Pool{3}]);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/189436/image.png)
Más respuestas (1)
Ver también
Categorías
Más información sobre Interactive Control and Callbacks en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!