How do I make a state button's value change due to an auxillary app being closed?

1 view (last 30 days)
I have a state button which displays "connect" and when clicked creates an auxillary application. Once the application is open, the state button displays "connecting".
When the auxillary application closes, what close request callback could I write to make the state button in the main application return to its normal state of displaying "connect"?

Answers (1)

Rik
Rik on 22 Jul 2022
There is a closereqfcn for the secondary window. That one should have access to the handle to the object in your main window. That means you have to share at least that handle with the secondary window when you create it.
  6 Comments
barney whitehead
barney whitehead on 25 Jul 2022
I've done that but still not working. Thank you for your help. I'm sure the solution is simple, I just can't work out how exactly to do it from the online documentation.
Rik
Rik on 25 Jul 2022
Does the second window have to be an AppDesigner app? If not, you can use the advice from this thread to create one from a function (using only code to create either a figure or a uifigure).

Sign in to comment.

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!