I have a question about the following editable text box,
f = figure; % Make example figure
peaks; % Plot peaks data that comes preloaded with Matlab
S.ed = uicontrol('style','edit',... % Make editable text box 'units','pixels', ... 'position',[10 100 200 30],... 'fontsize',11,... 'string','Enter a Word');
How do I implement the following?
- When the user starts to type, the text 'Enter a Word' disappears from the text box
- When the user presses enter at the end of a character sequence, the entry is "done" and no more characters are accepted, similar to a carriage return?
As a user, this is how I expect text boxes to work, but I don't know how to implement it.
Best Answer