callback of multi line edit box
Mostrar comentarios más antiguos
Please run code below,
Callback of left edit box responds to enter key while right one doesn't.
Once edit box set as multi-line, callback doest not be triggered by 'enter' key.
How can I get multi-line edit box which response to enter key.
hfig = figure('OuterPosition', [100,100,300,200]);
hedit_left = uicontrol('Style','edit', 'Units','normalized','Position',[0, 0,0.5,1]);
hedit_right = uicontrol('Style','edit','Max',2,'Units','normalized','Position',[0.5,0,0.5,1]);
set(hedit_left, 'Callback', @(src,evt)disp(src.String))
set(hedit_right, 'Callback', @(src,evt)disp(src.String))
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Interactive Control and Callbacks en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!