imgbutton

版本 1.0.0.0 (1.6 KB) 作者: Daniel
IMGBUTTON returns a uicontrol that toggles two images to indicate state.
210.0 次下载
更新时间 2013/7/9

查看许可证

HB = IMGBUTTON(H,CDATA) returns a handle to a uicontrol in parent H where
the two-element cell array CDATA contains image data to indicate the off
and on states of the button.

IMGBUTTON(...,'PROP1',VAL1,'PROP2',VAL2,...) sets the other properties of
the uicontrol.

For some reason, the buttons do not seem to work in uibuttongroups as
expected.

Only works for checkbox, radiobutton and togglebutton styles.

Example:
cdata = {imread('off.png'),imread('on.png')};
hbtn = imgbutton(gcf,cdata,'position',[0 0 50 50]);

引用格式

Daniel (2024). imgbutton (https://www.mathworks.com/matlabcentral/fileexchange/42555-imgbutton), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2009a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Migrate GUIDE Apps 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0