Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Matlab gui resize issue

  1. Jul 17, 2013 #1
    I have been trying the following to reposition my GUI (within the OpeningFcn):

    h=get(handles.figure1,'Position');
    set(0,'Units','normalized')
    S = get(0,'screensize');
    width = h(3);
    height=h(4);
    x = (S(3) - width)/2;
    y = (S(4) - height)/2;
    set(handles.figure1,'Position',[x,y,width,height]);

    However this results in the Gui being position in an unexpected position. I am not sure why this is but the problem persists even if I replace set(handles.figure1,'Position',[x,y,width,height]) with set(handles.figure1,'Position',S) - I expected this change in code to result in a full screen gui however the position was offset (the width and height appeared correct though).
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted



Similar Discussions: Matlab gui resize issue
  1. Vb.net\ Gui (Replies: 5)

  2. Java GUI (Replies: 3)

  3. Matlab memory issues (Replies: 0)

  4. C# Window Resizing (Replies: 5)

Loading...