<div class="gmail_quote">On Fri, Mar 27, 2009 at 2:46 PM, Wayne Watson <span dir="ltr">&lt;<a href="mailto:sierra_mtnview@sbcglobal.net">sierra_mtnview@sbcglobal.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



  

<div bgcolor="#ffffff" text="#000000">
It&#39;s very difficult to tell. I&#39;ve tried it. <br>
        fLocation=Frame(master)<br>
        fLocation.pack(side=LEFT)<br>
I need to size the fLocation frame to make it big. As it is, it must be
giving the smallest possible size. <br>
<br>
I tried this<br>
        fLocation.pack(expand=YES,fill=BOTH,side=TOP)<br></div></blockquote></div><br>Good news... I got it!<br><br>Here&#39;s something that&#39;s often a good idea when debugging overlapping layouts (especially when you didn&#39;t design the parent!) - use different backgrounds! <br>
<br>First I tried grid_rowconfigure and grid_columnconfigure (which are necessary if you want your widgets in grid to resize and sticky in the expected places... at least in my experience. You call them on the parent widget which can be displayed with .pack() ) on fCoords - the parent of your labels. That didn&#39;t do anything, so I suspected the problem went deeper. So I tried fCoords parent, fLocation. That didn&#39;t do anything, so I finally went to /it&#39;s/ parent - master. By setting master.pack(expand=1, fill=BOTH) along with some other tweaks I was able to get some behavior I think you&#39;ll want.<br>
<br>I&#39;ve left my background and border changes so you can get a better idea of what I did. Feel free to play around with the colors, borders, sticky options, and sizes of things. It&#39;ll probably help you to get a better grasp of what&#39;s going on.<br>
<br>Here&#39;s my changes (also found here: <a href="http://rafb.net/p/clKroD65.html">http://rafb.net/p/clKroD65.html</a> )<br><br><pre class="code" id="codemain"><span class="comment"># Framing it<br></span><span class="keyword">from</span>   Tkinter <span class="keyword">import</span> *<br>
<span class="keyword">from</span>   tkSimpleDialog <span class="keyword">import</span> Dialog<br><span class="keyword">import</span> tkSimpleDialog<br><span class="keyword">import</span> tkMessageBox<br> <br><span class="keyword">class </span>DialogPrototype(Dialog):<br>
 <br>    <span class="keyword">def</span> body(self, master):<br>            <span class="comment"># Frames<br></span>        master.configure(bg=<span class="literal">&#39;white&#39;</span>, bd=3)<br>        master.pack(expand=1, fill=BOTH)<br>
        fLocationTitle = Frame(master, bg=<span class="literal">&#39;green&#39;</span>, bd=3)  <span class="comment"># fL... f for frame<br></span>        fLocationTitle.pack()<br>        fLocation=Frame(master, bg=<span class="literal">&#39;red&#39;</span>, bd=3)<br>
        fLocation.pack(expand=1, fill=BOTH, anchor=W)<br>        fCoords = Frame(fLocation, bg=<span class="literal">&#39;blue&#39;</span>, bd=3)      <span class="comment"># lat/long coords in a frame<br></span>        fCoords.pack(fill=BOTH, expand=1, side=LEFT)<br>
        fCoords.grid_columnconfigure(0, weight=0)<br>        fCoords.grid_columnconfigure(1, weight=1)<br>        fCoords.grid_columnconfigure(2, weight=0)<br>        fCoords.grid_columnconfigure(3, weight=1)<br>        fCoords.grid_rowconfigure(0, weight=1, minsize=1)<br>
 <br> <br>        self.title(<span class="literal">&quot;Enter Site/Misc. Data&quot;</span>)<br> <br>        <span class="comment"># Latitude and Longitude<br></span> <br>        Label(fLocationTitle, text=<span class="literal">&quot;Geographic Location&quot;</span>).grid(row=0,column=0)<br>
        <span class="comment">#Label(fCoords, text=&#39;Latitude:&#39;).grid(row=0, sticky=W)<br></span>        self.lab=Label(fCoords, text=<span class="literal">&#39;Latitude:&#39;</span>, height=5)<br>        self.lab.grid(row=0, column=0, sticky=W)<br>
        self.lat = Entry(fCoords, width=12)<br>        self.lat.grid(row=0, column=1, sticky=W+E)<br> <br>        Label(fCoords, text=<span class="literal">&#39;Longitude:&#39;</span>).grid(row=0, column=2)<br>        self.long = Entry(fCoords, width=12)<br>
        self.long.grid(row=0, column=3, sticky=W+E)<br> <br>        <span class="keyword">return</span><br> <br>    <span class="keyword">def</span> apply(self):<br>        <span class="keyword">print</span> <span class="literal">&quot;apply&quot;</span><br>
        <span class="keyword">print</span> self.lat.get()<br>        <span class="keyword">print</span> self.long.get()<br> <br>    <span class="keyword">print</span> <span class="literal">&quot;setting&quot;</span><br>    lat=1.0<br>
    long=0.0<br> <br> <br>root = Tk()<br>root.withdraw()<br>DialogPrototype(root)</pre>HTH,<br>The -other- Wayne<br>