Be the first to rate this file! 11 Downloads (last 30 days) File Size: 1.94 KB File ID: #18769
image thumbnail

Example - Dynamic GUI Layout

by Jiro Doke

 

15 Feb 2008 (Updated 07 Jan 2010)

This example shows how you can build a GUI with dynamic UI component positioning

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

| Watch this File

File Information
Description

This example demonstrates how you can build a GUI with dynamic positioning of UI components (no distortions).

It is a simple GUI with an axis, slider, and a push button. The slider changes the coefficient in the equation:

  y = sin(C*x) + cos((10-C)*x)

And it plots the equation. The push button resets the coefficient to 4.

The figure has a ResizeFcn defined so that every time the figure is resized, it re-positions the components. It keeps the size of the push button the same, and the slider and the axis fill the rest of the screen.

Try:
Resizing the figure window, and notice the size of the UI components.

This was a File Exchange Pick of the Week:
http://blogs.mathworks.com/pick/2008/02/15/gui-layout-part-1/

MATLAB release MATLAB 7.5 (R2007b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
07 Jan 2010

Copyright update.

Tag Activity for this File
Tag Applied By Date/Time
gui tools Jiro Doke 22 Oct 2008 09:47:49
example Jiro Doke 22 Oct 2008 09:47:49
gui Jiro Doke 22 Oct 2008 09:47:49
layout Jiro Doke 22 Oct 2008 09:47:49
resizefcn Jiro Doke 22 Oct 2008 09:47:49
dynamic Jiro Doke 22 Oct 2008 09:47:49
dynamic Sunny 08 Mar 2009 07:59:37
resizefcn Alexander Kort 19 Mar 2009 12:56:27
potw Shari Freedman 21 Apr 2009 13:50:48
gui thirdeye 09 Jul 2009 15:50:22
gui SRINIBAS BHUYAN 07 May 2010 10:34:14
pick of the week Jiro Doke 11 Feb 2011 20:08:16
dynamic Andi 26 Sep 2011 08:29:57

Contact us at files@mathworks.com