Matlab ResizeFcn callback
Ältere Kommentare anzeigen
I am worried about the look and feel of my GUI designed with Matlab. In concrete, I do not like how the figure window resizing is achieved. I have an uitabgroup (tabpanel) inside which there are three panels with border etchedin. Each time the figure is resized, it appears flickering between both positions of the panels. I hate this optical effect. So, I decided to build my own resizefcn callback to get being pleased. However, I realize Matlab first resizes the figure window and then it runs the commands inside the resizefcn callback. I would like to know if there is some solution that lets me to change this behaviour.
3 Kommentare
Jiro Doke
am 26 Feb. 2012
Are you saying that you want the resizefcn to be called before the figure size changes? If so, I'm not sure you can do that. When you click on an edge of a figure and move, the OS is going to change the size of the figure. Then after that, the resizefcn in MATLAB will be called. I don't think you can interject the resizefcn before the OS actually changes the figure.
Julián Francisco
am 27 Feb. 2012
Walter Roberson
am 27 Feb. 2012
The resize mechanism is ugly. But until such time as MATLAB comes complete with built-in layout functions for the elements ("put this part down here if there is room"), I don't know that anything can be done.
Akzeptierte Antwort
Weitere Antworten (2)
Walter Roberson
am 27 Feb. 2012
2 Stimmen
You might be able to reduce the flash grunge by setting the figure visibility to 'off' during the resize process, and then to 'on' again when the resize is finished.
1 Kommentar
Julián Francisco
am 27 Feb. 2012
Malcolm Lidierth
am 27 Feb. 2012
1 Stimme
If you a using the mouse to resize, the figure will always be updated multiple times because it has multiple sizes between the start and end of the mouse drag. There are any number of solutions. See http://undocumentedmatlab.com/blog/controlling-callback-re-entrancy/
1 Kommentar
Julián Francisco
am 27 Feb. 2012
Kategorien
Mehr zu Interactive Control and Callbacks finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!