Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Thread Subject:
Editbox deletes text

Subject: Editbox deletes text

From: Brett

Date: 2 Sep, 2012 21:36:06

Message: 1 of 2

Hi, my edit text box causes the input text to disappear when you click off of it. How do I stop it from doing this. My code is below:

function edit1_Callback(hObject, eventdata, handles)
Variable1 = get(hObject, 'string')
set(hObject, 'string', hObject(1:end-1))

Subject: Editbox deletes text

From: Sadik

Date: 2 Sep, 2012 21:54:08

Message: 2 of 2

Hi Brett,

Revise the following line:

set(hObject, 'string', hObject(1:end-1));

I don't know what you would like to do but it seems to serve that purpose, the second hObject should be replaced with Variable1 as follows:

set(hObject, 'string', Variable1(1:end-1));


Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us