Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
multiple panels in gui by matlab

Subject: multiple panels in gui by matlab

From: ahmed

Date: 5 Jun, 2011 11:14:04

Message: 1 of 2

I have multiple buttons and I need to add panel to each button, in other words when if I press on the button, its panel will appear.

The problem:
I don't know how to add multiple panels to the same gui, if any know how please answer me.
thanks alot

Subject: multiple panels in gui by matlab

From: Sadik

Date: 6 Jun, 2011 04:50:05

Message: 2 of 2

Hello Ahmed,

This should get you started:

% Open a new figure window. This will be the panel.

h = figure;

% Set properties. If you want a modal window, that is, if you don't want the areas outside the window to be clickable, you should set the 'WindowStyle' property to 'modal'.

set(h,'MenuBar','None','Resize','Off','Name','You can name this as you want','NumberTitle','Off','Position',[100 128 845 500]);

% Put a button on the panel. You can put any other thing you want: edit box, etc.
uicontrol(h,'style','pushbutton','units','pixels','string','My Button','Callback',@figure,'position',[100 100 100 100]);


Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us