Azzera filtri
Azzera filtri

How to keep the size aspect ratio of GUI form fixed?

2 visualizzazioni (ultimi 30 giorni)
Naz il 18 Ott 2011
Hi all. I am trying to make my GUI figure to be resizable but I need the aspect ratio to be fixed. Is this possible to achieve?

Risposte (1)

Walter Roberson
Walter Roberson il 18 Ott 2011
You can put in a resize callback on the figure that changes the size to match the aspect ratio you want.
  2 Commenti
Naz il 18 Ott 2011
My GUI figure is called 'Vessel' and here is a code I provide for it:
function Vessel_Callback(hObject, eventdata, handles)
[x y w h]=get(hObject,'Position')
set(hObject,'Position',[x y w h])
So far, it does not seem to work
Naz il 19 Ott 2011
Walter, can you give me a more explicit suggestion?

Accedi per commentare.


Scopri di più su Interactive Control and Callbacks in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by