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

2 views (last 30 days)
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!

Accepted Answer

David Sanchez
David Sanchez on 25 Jul 2013
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 )

More Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!