设为首页 加入收藏

TOP

一个简单的matlab图形界面程序GUI(三)
2014-11-24 03:17:23 来源: 作者: 【 】 浏览:2
Tags:一个 简单 matlab 图形 界面 程序 GUI
erImageNo.maxValue + ...
handles.sliderImageNo.minValue;
initValue = floor(initValue/2);
set(hObject, 'value', initValue);
guidata(hObject, handles);

function imgNo_Callback(hObject, eventdata, handles)
% hObject handle to imgNo (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
current_no = str2double(get(hObject,'String'));
if imgno_number_check(current_no, handles) == -1
return;
else
gui_contents_update(handles, current_no);
end
guidata(hObject, handles);

% --- Executes during object creation, after setting all properties.
function imgNo_CreateFcn(hObject, eventdata, handles)
% hObject handle to imgNo (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
initValue = handles.sliderImageNo.maxValue + ...
handles.sliderImageNo.minValue;
initValue = floor(initValue/2);
set(hObject, 'String', num2str(initValue));
guidata(hObject, handles);


function preBut_Callback(hObject, eventdata, handles)
% hObject handle to preBut (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% previous button callback
current_no = str2double(get(handles.imgNo,'String'));
if imgno_number_check(current_no, handles) == -1
return;
elseif imgno_number_check(current_no, handles) == 2
msgbox('At the first image!!','Attention','modal');
else
current_no = current_no - 1;
end
gui_contents_update(handles, current_no);
guidata(hObject, handles);


function nextBut_Callback(hObject, eventdata, handles)
% hObject handle to nextBut (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% next button callback
current_no = str2double(get(handles.imgNo,'String'));
if imgno_number_check(current_no, handles) == -1
return;
elseif imgno_number_check(current_no, handles) == 3
msgbox('At the last image!!','Attention','modal');
else
current_no = current_no + 1;
end
gui_contents_update(handles, current_no);
guidata(hObject, handles);


% --- Executes on button press in timesRd.
function timesRd_Callback(hObject, eventdata, handles)
% hObject handle to timesRd (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hint: get(hObject,'Value') returns toggle state of timesRd


function showGUI_CreateFcn(hObject, eventdata, handles)
% hObject handle to showGUI (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
handles.sliderImageNo.maxValue = 6000;
handles.sliderImageNo.minValue = 1;
guidata(hObject, handles);


function nbs_Callback(hObject, eventdata, handles)
% hObject handle to nbs (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
current_no = floor(str2double(get(handles.imgNo,'String'

首页 上一页 1 2 3 4 5 6 下一页 尾页 3/6/6
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇如何用Java实现获得MySQL数据库中.. 下一篇队列的多种C语言实现

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·C语言中如何将结构体 (2025-12-24 22:20:09)
·纯C语言结构体成员变 (2025-12-24 22:20:06)
·C语言中,指针函数和 (2025-12-24 22:20:03)
·哈希表 - 菜鸟教程 (2025-12-24 20:18:55)
·MySQL存储引擎InnoDB (2025-12-24 20:18:53)