GUIDE-Program interface cut-off

9 Ansichten (letzte 30 Tage)
Henri
Henri am 21 Sep. 2011
Hello,
I wrote a program that works perfectly fine on my computer and two laptops that I used for testing. All Windows 7 with different resolutions, (Matlab R2010b). But as soon as I give the program to a collegue to test it (Linux, R2009a) the program's GUI is cut off and the text size is bigger. For your information I am using size commands to change the UI and using "pixels" units with that, not "normalized". See screenshots:
My Screen:
My Collegues Screen:
Can anyone tell what is happening here? I would really appreciate a solution that does not change units to "normalized" as it would be quite a pile of work to change all that. (By changing one of the popup menus the whole GUI changes and the Boxes have to be realigned and the size of the program window changes.)
Thanks You!
~~CASE CLOSED~~
Turns out my collegue was using R2007 as i was using R2010b, which caused these differences. Seems like the old versions had different standard Fonts and Proportions.
Thanks!

Akzeptierte Antwort

Daniel Shub
Daniel Shub am 21 Sep. 2011
Are you relying on the default font and font size or are you setting it? I would think:
set(hfig, 'DefaultAxesFontName', fontName, 'DefaultTextFontName', fontName)
set(hfig, 'DefaultAxesFontSize', fontSize, 'DefaultTextFontSize', fontSize)
where hfig is an array of handles to the figure(s) in the gui and fontName and fontSize are the desired font name (string) and font size (double) would take care of teh font issues.
As for the resizing, does
get(0, 'MonitorPositions')
get(0, 'ScreenSize')
return reasonable values on your colleagues machine?
  4 Kommentare
Henri
Henri am 29 Sep. 2011
To be honest I have difficulties changing the default font name and size.
In which function do I insert the two mentioned command lines? I put them into "function myprogramname_OpeningFcn(blabla)" in front of the line "guidata(hObject, handles);". But it doesn't work.
If I change the font size by using the GUIDE Property Inspector it changes th font size and makes the text disapper if the panel is too small, but the window size remains correct.
Daniel Shub
Daniel Shub am 29 Sep. 2011
I need a little more. Do you have the correct handles for hfig? I am not sure how guide works in this case, but maybe
set(0, 'DefaultAxesFontName', fontName, 'DefaultTextFontName', fontName)
set(0, 'DefaultAxesFontSize', fontSize, 'DefaultTextFontSize', fontSize)
right after you start MATLAB and before you do anything might help.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by