callback of multi line edit box
Show older comments
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))
Accepted Answer
More Answers (0)
Categories
Find more on Interactive Control and Callbacks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!