function varargout = txt1(varargin)
% TXT1 MATLAB code for txt1.fig
% TXT1, by itself, creates a new TXT1 or raises the existing
% singleton*.
%
% H = TXT1 returns the handle to a new TXT1 or the handle to
% the existing singleton*.
%
% TXT1('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in TXT1.M with the given input arguments.
%
% TXT1('Property','Value',...) creates a new TXT1 or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before txt1_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to txt1_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help txt1
% Last Modified by GUIDE v2.5 09-Mar-2019 11:11:27
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @txt1_OpeningFcn, ...
'gui_OutputFcn', @txt1_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before txt1 is made visible.
function txt1_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to txt1 (see VARARGIN)
% Choose default command line output for txt1
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes txt1 wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = txt1_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
function edit1_Callback(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit1 as text
% str2double(get(hObject,'String')) returns contents of edit1 as a double
% --- Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
textString = get(handles.text2,'String');
textString = strcat(textString,'0');
set(handles.text2,'String',textString)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
textString = get(handles.text2,'String');
textString = strcat(textString,'1');
set(handles.text2,'String',textString)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
textString = get(handles.text2,'String');
textString = strcat(textString,'2');
set(handles.text2,'String',textString)
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles)
textString = get(handles.text2,'String');
textString = strcat(textString,'3');
set(handles.text2,'String',textString)
% hObject handle to pushbutton4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton5.
function pushbutton5_Callback(hObject, eventdata, handles)
textString = get(handles.text2,'String');
textString = strcat(textString,'4');
set(handles.text2,'String',textString)
% hObject handle to pushbutton5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton6.
function pushbutton6_Callback(hObject, eventdata, handles)
textString = get(handles.text2,'String');
textString = strcat(textString,'5');
set(handles.text2,'String',textString)
% hObject handle to pushbutton6 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton7.
function pushbutton7_Callback(hObject, eventdata, handles)
textString = get(handles.text2,'String');
textString = strcat(textString,'6');
set(handles.text2,'String',textString)
% hObject handle to pushbutton7 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton8.
function pushbutton8_Callback(hObject, eventdata, handles)
textString = get(handles.text2,'String');
textString = strcat(textString,'7');
set(handles.text2,'String',textString)
% hObject handle to pushbutton8 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton9.
function pushbutton9_Callback(hObject, eventdata, handles)
textString = get(handles.text2,'String');
textString = strcat(textString,'8');
set(handles.text2,'String',textString)
% hObject handle to pushbutton9 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton10.
function pushbutton10_Callback(hObject, eventdata, handles)
textString = get(handles.text2,'String');
textString = strcat(textString,'9');
set(handles.text2,'String',textString)
% hObject handle to pushbutton10 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in pushbutton11.
function pushbutton11_Callback(hObject, eventdata, handles)
textString = get(handles.text2,'String');
textString = strcat(textString,'+');
set(handles.text2,'String',textString)
% hObject handle to pushbutton11 (see GCBO)
% eventdata reserved - to be defined in a futur
陶坤--201711708009.zip_计算器代码
版权申诉
184 浏览量
2022-07-15
14:15:58
上传
评论
收藏 68KB ZIP 举报
我虽横行却不霸道
- 粉丝: 77
- 资源: 1万+
最新资源
- 数据库管理工具:dbeaver-ce-23.3.3-stable.x86-64.rpm
- 网络安全详细介绍.docx
- 爱普生打印机L805废墨仓清零软件永久版和说明
- 数据库管理工具:dbeaver-ce-23.3.3-macos-x86-64.dmg
- 数据库管理工具:dbeaver-ce-23.3.3-macos-aarch64.dmg
- 神经网络详细介绍.docx
- 数据库管理工具:dbeaver-ce-23.3.2-x86-64-setup.exe
- 小米电视2刷机包55寸48寸通刷包V1.2.15,降级专用
- 数据库管理工具:dbeaver-ce-23.3.2-stable.x86-64.rpm
- 无人驾驶汽车如何处理地图和定位?
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
评论0