MATLAB: App.UIfigure.Visible does not keep the app window on top of all other windows

app designerfigurematlab function

Hi all
using the following line does not really keep the app window in appdesigner on top of all other windows , I have two pushbuttons and for each, the window should remain on top:
app.UIFigure.Visible = 'on';

Best Answer

Try using drawnow with the figure command in your button callbacks (see this post)
drawnow;
figure(app.UIFigure)