Got Questions? Get Answers.
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:
How to create new gui elements at runtime?

Subject: How to create new gui elements at runtime?

From: Jack Grigg

Date: 9 Sep, 2010 14:25:35

Message: 1 of 3

Hi

This is probably a trivial question...
I have created a gui with GUIDE, and i want to add a few additional axes at runtime. The number of axes depends on runtime variables, so using the visibility property is not an option. How might i accomplish this?

Many thanks
Jack

Subject: How to create new gui elements at runtime?

From: Sean

Date: 9 Sep, 2010 14:51:05

Message: 2 of 3

"Jack Grigg" <jrgrigg.spam@gmail.com> wrote in message <i6aqov$gdr$1@fred.mathworks.com>...
> Hi
>
> This is probably a trivial question...
> I have created a gui with GUIDE, and i want to add a few additional axes at runtime. The number of axes depends on runtime variables, so using the visibility property is not an option. How might i accomplish this?
>
> Many thanks
> Jack

What is the max number of axes you will have? You could have the axes saved and just turn the visibility on as necessary. Otherwise, you could do a for-loop that creates n-axes but you'll have to have some systematic way to assign their location. I would recommend using the first option.

Subject: How to create new gui elements at runtime?

From: Walter Roberson

Date: 9 Sep, 2010 18:40:47

Message: 3 of 3

On 10-09-09 09:25 AM, Jack Grigg wrote:

> This is probably a trivial question... I have created a gui with GUIDE,
> and i want to add a few additional axes at runtime. The number of axes
> depends on runtime variables, so using the visibility property is not an
> option. How might i accomplish this?

You can place direct calls to the axes() function -- though, as hinted by the
other respondent, figuring out where to position the axes can be a bit more
difficult.

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