<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/159510</link>
    <title>MATLAB Central Newsreader - set GUI Position</title>
    <description>Feed for thread: set GUI Position</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Sun, 18 Nov 2007 20:07:38 -0500</pubDate>
      <title>set GUI Position</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/159510#401981</link>
      <author>Lars Warmbold</author>
      <description>I inserted the following code to my GuiOpeningFcn in order&lt;br&gt;
to place the GuiFigure on the very left side of the screen&lt;br&gt;
at start:&lt;br&gt;
&lt;br&gt;
set(gcf, 'Units'   , 'Normalized');&lt;br&gt;
set(gcf, 'Position', [0, 0.3, 1, 0.5]);&lt;br&gt;
&lt;br&gt;
But the Gui-MainFcn does something I don't understand!!!&lt;br&gt;
There's always some space on the left hand side of the Gui&lt;br&gt;
left. I figured out that Matlab forces 'undocked' figures to&lt;br&gt;
appear on the screen at start: means that&lt;br&gt;
&lt;br&gt;
set(gcf, 'Position', [-2, 0.3, 1, 0.5]);&lt;br&gt;
&lt;br&gt;
leads to the same position as the above given: On screen but&lt;br&gt;
not as far left as possible.&lt;br&gt;
&lt;br&gt;
How can I supress the 'automatic placing service' done by&lt;br&gt;
the GuiMainFcn?&lt;br&gt;
&lt;br&gt;
Thanks in advance!!! LARS</description>
    </item>
    <item>
      <pubDate>Sun, 18 Nov 2007 21:37:34 -0500</pubDate>
      <title>Re: set GUI Position</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/159510#401985</link>
      <author>Bruno Luong</author>
      <description>&quot;Lars Warmbold&quot; &amp;lt;mustermann.klaus.TO.REMOVE@gmx.de&amp;gt; wrote in&lt;br&gt;
message &amp;lt;fhq62a$4tb$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&lt;br&gt;
It seems that after calling OpeningFcn,&lt;br&gt;
gui_mainfcn calls&lt;br&gt;
openfig calls &lt;br&gt;
movegui(fig, 'onscreen'), which add a margin of 30 pixels.&lt;br&gt;
&lt;br&gt;
If you are willing to mess around with MATLAB source, you&lt;br&gt;
could edit the file movegui.m (on $MATLAB/toolbox/uitools/&lt;br&gt;
), and change the variable margin to 0 (or -1).&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
    <item>
      <pubDate>Mon, 19 Nov 2007 10:41:24 -0500</pubDate>
      <title>Re: set GUI Position</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/159510#402057</link>
      <author>Lars Warmbold</author>
      <description>&quot;Bruno Luong&quot; &amp;lt;brunoluong@yahoo.com&amp;gt; wrote in message&lt;br&gt;
&amp;lt;fhqbau$bej$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Lars Warmbold&quot; &amp;lt;mustermann.klaus.TO.REMOVE@gmx.de&amp;gt; wrote in&lt;br&gt;
&amp;gt; message &amp;lt;fhq62a$4tb$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; It seems that after calling OpeningFcn,&lt;br&gt;
&amp;gt; gui_mainfcn calls&lt;br&gt;
&amp;gt; openfig calls &lt;br&gt;
&amp;gt; movegui(fig, 'onscreen'), which add a margin of 30 pixels.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; If you are willing to mess around with MATLAB source, you&lt;br&gt;
&amp;gt; could edit the file movegui.m (on $MATLAB/toolbox/uitools/&lt;br&gt;
&amp;gt; ), and change the variable margin to 0 (or -1).&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Bruno&lt;br&gt;
&lt;br&gt;
Thank You Bruno! That's what I found out too. I thought&lt;br&gt;
there could be a softer way  like&lt;br&gt;
&lt;br&gt;
set(fig, 'Onscreen', 'Off');&lt;br&gt;
&lt;br&gt;
just to be included in OpeningFcn...&lt;br&gt;
&lt;br&gt;
Hmm. Finally I put this position setting into the OutputFcn,&lt;br&gt;
which is called after the Gui is placed automatcally. Thanks&lt;br&gt;
anyway!!!&lt;br&gt;
&lt;br&gt;
LARS</description>
    </item>
    <item>
      <pubDate>Fri, 20 Jan 2012 18:00:11 -0500</pubDate>
      <title>Re: set GUI Position</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/159510#864301</link>
      <author>Francis </author>
      <description>&quot;Lars&quot; wrote in message &amp;lt;fhrp8k$7eo$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Thank You Bruno! That's what I found out too. I thought&lt;br&gt;
&amp;gt; there could be a softer way  like&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; set(fig, 'Onscreen', 'Off');&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; just to be included in OpeningFcn...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Hmm. Finally I put this position setting into the OutputFcn,&lt;br&gt;
&amp;gt; which is called after the Gui is placed automatcally. Thanks&lt;br&gt;
&amp;gt; anyway!!!&lt;br&gt;
&lt;br&gt;
I have the same problem you described - an annoying gap between the GUI window and the edge of the screen which no amount of repositioning seems to eliminate. I wanted to try your solution about but in my version of MATLAB (2009b) there is no 'Onscreen' property. Was this removed?? And if so, is there another way to have the GUI window positioned hard against the edge of the screen? (I am not willing to alter MATLAB function code.)&lt;br&gt;
Cheers,&lt;br&gt;
Francis</description>
    </item>
  </channel>
</rss>

