uifigureOnTop

Allows to trigger uifigure's "Always On Top" state in Matlab

https://github.com/i3v/uifigureOnTop

You are now following this Submission

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

% INPUT ARGUMENTS:

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

% USAGE:

* 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:
https://www.mathworks.com/matlabcentral/fileexchange/42252-winontop

% LIMITATIONS:

* 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 https://undocumentedmatlab.com/blog/customizing-uifigures-part-1

Cite As

Igor (2026). uifigureOnTop (https://github.com/i3v/uifigureOnTop), GitHub. Retrieved .

Acknowledgements

Inspired by: WinOnTop

Categories

Find more on Update figure-Based Apps in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with R2017b and later releases

Platform Compatibility

  • Windows
  • macOS
  • Linux

Versions that use the GitHub default branch cannot be downloaded

Version Published Release Notes Action
1.0.1

Added pic.

1.0.0

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.