GUI界面修饰

 1 function varargout = GUI20(varargin)
 2 % GUI20 MATLAB code for GUI20.fig
 3 %      GUI20, by itself, creates a new GUI20 or raises the existing
 4 %      singleton*.
 5 %
 6 %      H = GUI20 returns the handle to a new GUI20 or the handle to
 7 %      the existing singleton*.
 8 %
 9 %      GUI20('CALLBACK',hObject,eventData,handles,...) calls the local
10 %      function named CALLBACK in GUI20.M with the given input arguments.
11 %
12 %      GUI20('Property','Value',...) creates a new GUI20 or raises the
13 %      existing singleton*.  Starting from the left, property value pairs are
14 %      applied to the GUI before GUI20_OpeningFcn gets called.  An
15 %      unrecognized property name or invalid value makes property application
16 %      stop.  All inputs are passed to GUI20_OpeningFcn via varargin.
17 %
18 %      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
19 %      instance to run (singleton)".
20 %
21 % See also: GUIDE, GUIDATA, GUIHANDLES
22 
23 % Edit the above text to modify the response to help GUI20
24 
25 % Last Modified by GUIDE v2.5 24-Jan-2018 10:23:06
26 
27 % Begin initialization code - DO NOT EDIT
28 gui_Singleton = 1;
29 gui_State = struct('gui_Name',       mfilename, ...
30                    'gui_Singleton',  gui_Singleton, ...
31                    'gui_OpeningFcn', @GUI20_OpeningFcn, ...
32                    'gui_OutputFcn',  @GUI20_OutputFcn, ...
33                    'gui_LayoutFcn',  [] , ...
34                    'gui_Callback',   []);
35 if nargin && ischar(varargin{1})
36     gui_State.gui_Callback = str2func(varargin{1});
37 end
38 
39 if nargout
40     [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
41 else
42     gui_mainfcn(gui_State, varargin{:});
43 end
44 % End initialization code - DO NOT EDIT
45 
46 
47 % --- Executes just before GUI20 is made visible.
48 function GUI20_OpeningFcn(hObject, eventdata, handles, varargin)
49 % This function has no output args, see OutputFcn.
50 % hObject    handle to figure
51 % eventdata  reserved - to be defined in a future version of MATLAB
52 % handles    structure with handles and user data (see GUIDATA)
53 % varargin   command line arguments to GUI20 (see VARARGIN)
54 
55 % Choose default command line output for GUI20
56 handles.output = hObject;
57 
58 A = imread('按钮.jpg');
59 set(handles.pushbutton1,'CData',A);
60 
61 
62 
63 % Update handles structure
64 guidata(hObject, handles);
65 
66 % UIWAIT makes GUI20 wait for user response (see UIRESUME)
67 % uiwait(handles.figure1);
68 
69 
70 % --- Outputs from this function are returned to the command line.
71 function varargout = GUI20_OutputFcn(hObject, eventdata, handles) 
72 % varargout  cell array for returning output args (see VARARGOUT);
73 % hObject    handle to figure
74 % eventdata  reserved - to be defined in a future version of MATLAB
75 % handles    structure with handles and user data (see GUIDATA)
76 
77 % Get default command line output from handles structure
78 varargout{1} = handles.output;
79 
80 
81 
82 
83 
84 % --- Executes on button press in pushbutton1.
85 function pushbutton1_Callback(hObject, eventdata, handles)
86 % hObject    handle to pushbutton1 (see GCBO)
87 % eventdata  reserved - to be defined in a future version of MATLAB
88 % handles    structure with handles and user data (see GUIDATA)
View Code

 

修饰按钮:

posted @ 2018-01-24 10:31  wydxry  阅读(377)  评论(0)    收藏  举报
Live2D