File Exchange

image thumbnail


version 1.0.1 (2.76 KB) by Igor
Allows to trigger uifigure's "Always On Top" state in Matlab


Updated 27 Oct 2019

From GitHub

View Version History

View license on GitHub

UIFIGUREONTOP allows to trigger uifigure's "Always On Top" state


* uifig - Matlab uifigure handle, scalar
* isOnTop - logical scalar or empty array


* uifigureOnTop(uifigure, true); - switch on "always on top"
* uifigureOnTop(uifigure, false); - switch off "always on top"
* uifigureOnTop(uifigure); - equal to uifigureOnTop( uifigure,true);
* WasOnTop = uifigureOnTop(...); - returns boolean value "if figure WAS on top"
* isOnTop = uifigureOnTop(uifigure,[]) - get "if figure is on top" property

For Matlab windows, created via `hf=figure()` use `WinOnTop()`, see:


* java enabled
* figure must be visible
* figure's "WindowStyle" should be "normal"
* figureHandle should not be casted to double, if using HG2 (R2014b+)

Based on

Cite As

Igor (2021). uifigureOnTop (, GitHub. Retrieved .

Comments and Ratings (1)

Shaul Shvimmer

Thank you very much, it works like a charm.

MATLAB Release Compatibility
Created with R2019a
Compatible with R2017b and later releases
Platform Compatibility
Windows macOS Linux

Inspired by: WinOnTop

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!