필터 지우기
필터 지우기

[GUI] How to make a push button move when i click on it?

조회 수: 1 (최근 30일)
Patrick
Patrick 2013년 7월 25일
Hi, I started to use GUI 2 weeks ago, so I'm pretty new to it. I'm using GUIDE to make a game. I'm wondering how to make a pushbutton move upwards for a little bit every time I click on it? BTW I'm very confused by the concept of handles and I've been searching for solutions for so long and cannot find one, so I'm here for some help. I appreciate all the helps you give. Please save my life! This is my homework!

채택된 답변

David Sanchez
David Sanchez 2013년 7월 25일
Set the following in the push_button callback function.
new_position_array = [20 20 20 20]; % example of new position
set( handle.my_push_button,'Position', new_position_array )

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by