- 1、本文档共3页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Kinds of Callbacks
The following table lists the callback properties that are available, their triggering events, and the components to which they apply.
Note:User interface controls include push buttons, sliders, radio buttons, check boxes, editable text boxes, static text boxes, list boxes, and toggle buttons. They are sometimes referred to as uicontrols.
GUIDE Callback Arguments
All callbacks in a GUIDE-generated GUI code file have the following standard input arguments:
hObject — Handle of the object, e.g., the GUI component, for which the callback was triggered. For a button group SelectionChangeFcn callback, hObject is the handle of the selected radio button or toggle button.
eventdata — Sequences of events triggered by user actions such as table selections emitted by a component in the form of a MATLAB struct (or an empty matrix for components that do not generate eventdata)
handles — A MATLAB struct that contains the handles of all the objects in the GUI, and may also contain application-defined data. See handles Structure for information about this structure.
Object Handle
The first argument is the handle of the component issuing the callback. Use it to obtain relevant properties that the callback code uses and change them as necessary. For example,
theText = get(hObject,String);
places the String property (which might be the contents of static text or name of a button) into the local variable theText. You can change the property by setting it, for example
set(hObject,String,date)
This particular code changes the text of the object to display the current date.
Event Data
Event data is a stream of data describing user gestures, such as key presses, scroll wheel movements, and mouse drags. The auto-generated callbacks of GUIDE GUIs can access event data for Handle Graphics? and uicontrol and uitable object callbacks. The following ones receive event data when triggered:
CellEditCallback in a uitable
CellSelectionCallback in a uitable
KeyPressFcn
您可能关注的文档
最近下载
- 2019 2020人音版小学六年级下册质量检测音乐试卷及答案.doc
- NB-T11094-2023水下自护混凝土技术导则.pdf
- 第六章 1 牡丹月季.ppt VIP
- 2025【维维股份财务风险及应对策略探析9200字】.doc
- 20210730-大有期货-煤炭期货月度分析报告:保供增产持续发力,煤价或阶段性回调.pdf VIP
- 2023入团团史团章考试精选100题题库(含答案).pdf
- 教学成果奖励 高考奖励方案.docx VIP
- 约翰迪尔7600_7700_7800拖拉机维修手册 英文l.pdf
- DB41_T 1037-2015垂直度检测尺校准装置规范.doc
- 2024年医药卫生考试-医院信息科笔试参考题库含答案.docx
文档评论(0)