Monitor key press while editing text description in figure
4 views (last 30 days)
Show older comments
Hi everybody,
In my figure, I am inserting a text, which is editable after clicking on it:
TextObject = text(0.5,0.5, 'Please edit this text', 'ButtonDownFcn', @ClickActionText)
function ClickActionText(Source, Event)
fprintf('Text clicked!\n')
set(Source, 'Editing', 'on');
end
Now, I want to monitor the keys pressed during editing the textbox. Actually, I'd like to exit the editing mode by pressing enter - instead of clicking somewhere else in the figure or pressing ESC.
0 Comments
Answers (1)
See Also
Categories
Find more on Printing and Saving 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!