77范文网 - 专业文章范例文档资料分享平台

GUI中Button Types and Button Group的介绍(4)

来源:网络收集 时间:2021-09-24 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

%

% TEST_BUTTON_GROUP( Property ,'Value ,…) creates a new

TEST_BUTTON_GROUP or raises the

% existing singleton*. Starting from the left, property value pairs are

% applied to the GUI before test_button_group_OpeningFcn gets called. An % unrecognized property name or invalid value makes property application % stop. All inputs are passed to test_button_group_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 test_button_group % Last Modified by GUIDE v2.5 17-Jul-2008 01:38:31

% Begin initialization code - DO NOT EDIT

gui_Singleton = 1;

gui_State = struct( gui_Name , mfilename, …

gui_Singleton , gui_Singleton, …

gui_OpeningFcn , @test_button_group_OpeningFcn, …

gui_OutputFcn , @test_button_group_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{:});

网上的对GUI控件的介绍!

else

gui_mainfcn(gui_State, varargin{:});

end

% End initialization code - DO NOT EDIT

% — Executes just before test_button_group is made visible.

function test_button_group_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 test_button_group (see VARARGIN) % Choose default command line output for test_button_group

handles.output = hObject;

% Update handles structure

set(handles.fontSelect_buttongroup, SelectionChangeFcn ,@fontSelect_buttongroup_SelectionChangeFcn);

guidata(hObject, handles);

% UIWAIT makes test_button_group wait for user response (see UIRESUME) % uiwait(handles.figure1);

% — Outputs from this function are returned to the command line.

function varargout = test_button_group_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 fontSelect_buttongroup_SelectionChangeFcn(hObject, eventdata) %retrieve GUI data, i.e. the handles structure

handles = guidata(hObject);

switch get(hObject, Tag ) % Get Tag of selected object

case fontsize08_radiobutton

%execute this code when fontsize08_radiobutton is selected

set(handles.display_staticText, FontSize ,8);

网上的对GUI控件的介绍!

case fontsize12_radiobutton

%execute this code when fontsize12_radiobutton is selected

set(handles.display_staticText, FontSize ,12);

case fontsize14_radiobutton

%execute this code when fontsize16_radiobutton is selected

set(handles.display_staticText, FontSize ,16);

otherwise

% Code for when there is no match. end

%updates the handles structure

guidata(hObject, handles);

Let me know please, I need to get this done!!

Thanks!

Edvier, I don t know what your error is.

In addition, we are not in the business of debugging code. You can download the source file for this GUI to troubleshoot. Maybe you didn t name your buttons correctly or set up the button panel incorrectly.

Goodluck debugging. If you have specific questions, come back and ask them! Hello, How can i increase the size of the tick in the checkbox?

Thanks,

Smith

网上的对GUI控件的介绍!

I tried to run the source code downloaded above. But there are some error occurred. The errors are as follows:

_______________________________________________________________________

There is no SelectionChangeFcn property in the uipanel class.

Error in ==> button_tutorial>button_tutorial_OpeningFcn at 58

set(handles.fontSelect_buttongroup, SelectionChangeFcn ,@fontSelect_buttongroup_SelectionChangeFcn);

Error in ==> gui_mainfcn at 166

feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:});

Error in ==> button_tutorial at 42

gui_mainfcn(gui_State, varargin{:});

_________________________________________________________________

______

P/S: How to solve this error?

Thanks.

Regards,

Jessie

Jessie,

Are you using an old version of MATLAB? It works fine for me on 2006 and 2007. (I assume it works on 2008 too)

Quan

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说公务员考试GUI中Button Types and Button Group的介绍(4)在线全文阅读。

GUI中Button Types and Button Group的介绍(4).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/gongwuyuan/1248728.html(转载请注明文章来源)

相关推荐:

Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: