Clear Filters
Clear Filters

Windows 7 GUI issue

3 views (last 30 days)
Ben Hornsby
Ben Hornsby on 10 May 2012
Hi, Im using matlab vR2012a and just switched to Windows 7 (32 bit) from XP. Now when I try to create a gui (on windows 7) the maximum position width is limited to 1276 pixels. This is ,much smaller than the width of my widescreen monitor (21"). I have programs using guis that were created on the old xp computer, using the same monitor, that now only take up about half the space of the monitor. The buttons on the on the gui are just cutoff (e.g., 8 buttons but only 4 are shown). I find I can fix this to some degree by running matlab in compatability mode. However, the program seems to be running a bit slower than it did previously on xp. Is this the only option for fixing the window size? Thanks,
  1 Comment
Daniel Shub
Daniel Shub on 11 May 2012
What does get(0, 'ScreenSize') give you?

Sign in to comment.

Answers (1)

Geoff
Geoff on 10 May 2012
I have absolutely no problem in R2012a on Windows 7 with the following code:
f = figure;
set(f, 'Position', [0, 0, 1920, 1080]);
Does that work for you? If not, then it may be some bizarre limitation in 32-bit Win7 (although there are no such limitations in the standard Win32 API).
I'm just assuming your monitor is 1920x1080... But anyway, if that code works for you then you have a bug in your GUI. If it truncates it to 1276 pixels then something else is going on.
When you say "other programs using GUIs", do you mean MatLab programs? Could this be to do with an assumption on font-sizes in pixels? Is your system font on either the WinXP or Win7 systems non-standard?

Community Treasure Hunt

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

Start Hunting!