from Engadget confused looking eh dapet this function also of its MATLAB HELP:: HELP emang mantab,, must diligently, basically the following examples use the function to change the properties on matlab uicontrol GUI MATLAB:
matlab tutorial this at first we make the following view is a GUI editor:
The component consists of:
1.button group contains 3 radio buttons: button group causes only one of the three radio buttons is worth one
next to the GUI editor right click on the button group>> viewcallback>> SelectionChangeFcn
This makes the function of the third selection in the button group radiobutton
then we fill the above functions to make editing text into 3 kinds of circumstances in the property 'enabled':
0n: can be edited
off: not editable gray
inactive: not editable, but not gray
function as follows:
uipanel1_SelectionChangeFcn function (hObject, eventdata, handles)
% HObject handle to uipanel1 (see GCBO)
% Eventdata reserved - to be defined in a future version of MATLAB
% Handles structure with handles and user data (see GUIDATA)
% function to change the properties (enable) control ui
if (hObject == handles.on)
set (handles.edit1, 'enable', 'on');
elseif (hObject == handles.off)
set (handles.edit1, 'enable', 'off');
else
set (handles.edit1, 'enable', 'inactive');
end
word after (handles) is the name of "Tag" on the uicontrol property
0n: can be edited
off: not editable gray
inactive: not editable, but not gray
function as follows:
uipanel1_SelectionChangeFcn function (hObject, eventdata, handles)
% HObject handle to uipanel1 (see GCBO)
% Eventdata reserved - to be defined in a future version of MATLAB
% Handles structure with handles and user data (see GUIDATA)
% function to change the properties (enable) control ui
if (hObject == handles.on)
set (handles.edit1, 'enable', 'on');
elseif (hObject == handles.off)
set (handles.edit1, 'enable', 'off');
else
set (handles.edit1, 'enable', 'inactive');
end
word after (handles) is the name of "Tag" on the uicontrol property
results are as follows:
No comments:
Post a Comment