Use icons of different shapes for push button in AppDesigner

Hello,
I would like to use icons of different shapes for some push buttons in my app simply for improving the visual aesthetics and user experience. For example, icons like MATLAB's run button which is a green triangle, but not a green triangle in a rectangular/square box. I tried using the button property Icon as described here: https://www.mathworks.com/help/matlab/ref/matlab.ui.control.button-properties.html. But this simply puts the picture of the icon inside the rectangular push button. I would like something like this (with the gray space here being the canvas, not a box containing the icon)
Appreciate any inputs.
Thanks!

댓글 수: 3

Not sure you can implement this with a pushbutton
Are you using app designer?
Yes, this is with App Designer.

댓글을 달려면 로그인하십시오.

답변 (1개)

Sean de Wolski
Sean de Wolski 2021년 11월 6일
편집: Sean de Wolski 2021년 11월 6일

0 개 추천

You could use a uiimage instead. Then set it's ImageClickedFcn instead of ButtonPushedFcn callback.

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

릴리스

R2021a

질문:

2021년 11월 5일

댓글:

2021년 11월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by