Appdesigner textbox: is there a way to do multiple lines like for step 1, step 2, etc..?
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Aaron Kurlantzick
el 26 de Nov. de 2019
Comentada: Aaron Kurlantzick
el 27 de Nov. de 2019
I'm trying to get a help textbox working for my app, but I'm having difficulty with the string. Currently I have this:
d = dialog('position', [200 500 300 300], 'Name', 'Help');
txt = uicontrol('Parent',d,'Style','text','HorizontalAlignment','left','Position', [20 200 280 40], 'String', 'Co is the concentration of alcohol taken into the system (g/L), k is the rate constant of gastric emptying (L/hour), ka is the rate of absorbance by the blood (L/hour), a is the constant for feedback control (g^2/hour^2), Vm is the maximum velocity (g/L/hour), Km is the Michaelis—Menten reaction constant (g/L)');
This makes a string that wraps to the second line, but stops at 'a is the constant...'
Is there a way to go make separate lines or just someway to have the whole string display?
Any help would be appreciated.
0 comentarios
Respuesta aceptada
Ankit
el 27 de Nov. de 2019
Hi Aaron,
by changing the position property (position: [left bottom width height]) you can fit your complete text.
d = dialog('position', [200 500 300 300], 'Name', 'Help');
txt = uicontrol('Parent',d,'Style','text','HorizontalAlignment','left','Position', [20 100 280 100],...
'String', 'Co is the concentration of alcohol taken into the system (g/L), k is the rate constant of gastric emptying (L/hour), ka is the rate of absorbance by the blood (L/hour), a is the constant for feedback control (g^2/hour^2), Vm is the maximum velocity (g/L/hour), Km is the Michaelis—Menten reaction constant (g/L)');
or using 'Units': 'normalized'
d = dialog('position', [200 500 300 300], 'Name', 'Help');
txt = uicontrol('Parent',d,'Units','normalized','Style','text','HorizontalAlignment','left','Position', [0 0 1 1],...
'String', 'Co is the concentration of alcohol taken into the system (g/L), k is the rate constant of gastric emptying (L/hour), ka is the rate of absorbance by the blood (L/hour), a is the constant for feedback control (g^2/hour^2), Vm is the maximum velocity (g/L/hour), Km is the Michaelis—Menten reaction constant (g/L)');
But I would prefer the solution provided in the below link:
Más respuestas (0)
Ver también
Categorías
Más información sobre Develop Apps Using App Designer 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!