Changing enable field in GUI property inspector

How to i change the enable field in the property ispector?
I have a radio button that when pressed, i want it to disable a text box.
this is what i have
set(handles.ions_dir, 'Enable', false)
where ions_dir is the text box i am trying to disable
but it doesnt seem to work. anyone know whats the correct command? thanks

 채택된 답변

Oleg Komarov
Oleg Komarov 2012년 3월 26일

1 개 추천

set(handles.ions_dir, 'Enable', 'off')

댓글 수: 8

Andy
Andy 2012년 3월 26일
i tried that, doesnt work
Andy
Andy 2012년 3월 26일
one question, where should i put it? i am putting it under the call back function of the radio button
Doesn't works doesn't say much. What you mean, do you get an error?
Andy
Andy 2012년 3월 26일
problem is right now when i click on that radio button, it doesnt run the call back function. why is this?
You should be able to have that line in the callback of a radio button. It should work - just remember that at some point you need to turn 'Enable' back 'on' if you ever want people to type in that edit text field again.
Andy
Andy 2012년 3월 26일
my problem right now is that when i click on the radio button, it doesnt run the call back function for the radio button
With that much info you gave us it would be impossible to guess what calls what.
I suggest to place a break point in the callback to see if it's called.
Andy
Andy 2012년 3월 26일
i got it working, i changed the call back part in the property inspector, thanks!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Installation and Setup에 대해 자세히 알아보기

태그

질문:

2012년 3월 26일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by