Reputation: 11
I have a GUI which has 10 panel in it. My LCD is 20". When I want to see my GUI in my laptop(15.6") I can not see my Panels properly. I have examined all the solutions, but I can not solve this problem. Can anyone help me?
Upvotes: 1
Views: 10257
Reputation: 2557
To resize the figure just change its Position
property. The panels will resize according to it, depending on how you specified your panel units. I.e., to maximize a figure:
set(figH,'Units','normalized');
set(figH,'Position',[0 0 1 1]);
In the case you want to specify your figure size as pixel units do:
set(figH,'Units','pixels');
set(figH,'Position',[left_gap_nPixels bottom_gap_nPixels length_nPixels width_nPixels]);
Btw, I haven't mentioned, but figH
is your figure (or panel handle, if you want to resize it). You can use gcf
if it is your current active handle.
Just as reference, the units you can specify are:
{'inches' 'centimeters' 'characters' 'normalized' 'points' 'pixels'}
Consider checking the figure properties documentation and uipanel properties for more details on the position and units property.
Hope it helps.
Upvotes: 3
Reputation: 4956
Take a look at property Units.
The size of a graphic object may be expressed in pixels, in characters, or better (for you) proportionally to the size of the parent.
If you change the units of the sizes of all the Panels to be proportional to the size of the main window, it will be ok. For the main window, simply use get(0,'ScreenSize');
to get the screen size in pixels.
Upvotes: 1