Title: Signature.html
Alan, the game changed in the thread you branched away from to other considerations. As stated there, I've thrown in the towel, but first let me say what the game was about. Here's the simplest example. Say I have four labels: small, big, house, cat, tree, and I want to put them in a column with full left justification. That is, like this:

small
big
house
cat
tree

What I get is:
 small
   big
 house
   eat
  tree

More or less centered. There seems to be no way to make left justify happen. Once an entry is placed to the right of these items, and another label+entry to the right of them, it gets weird.

What I did finally is just follow suit with what the author did for other fields on the dialog. It worked surprisingly well, but has a few oddities of its own. His code was quite mundane. He just didn't have to put up with four fields in a row.

I'll show you how it turned out with an image,  I'm going to send you, but not the group. My final example. If I sent it to the group, it won't post. I didn't bother to center the titles here, but it's easy to do. To make it prettier, I would like to have move, say in one row,  BOX+Lontitude+BOX over closer to Latitude. It looks OK though.

  IMAGE MISSING so at least the content could be posted. Typically, moderator approval for a msg
  with an image in it takes quite a bit of time, if it gets posted at all.

What I have is close enough. I'm going on to other issues in the author's program.

I'm including these statements from the "other" branch, for what they are worth here.
It's really too bad that someone doesn't write a fully comprehensible description of grid. Grayson comes close, and maybe even closer than I can imagine, since I only have his chapter 5 to go on. Putting out $50 to get the whole book (digital form) on material that is dated does not seem appropriate. The other choice is  the Python Org recommended (old) Tk/Tcl book, but do I need to spend 3-6 weeks installing and learning to use it, so that I can translate it into Tkinter? Not really. Otherwise, this is too much guess work and experimentation.  The Tkinter  newsgroup is pretty low traffic to get any timely help.

Maybe things will be better with the new Tkinter. This does not look like rocket science. Just missing parts of the story.

Alan Gauld wrote:

"W W" <sri...@gmail.com> wrote

Good news... I got it!

Here's something that's often a good idea when debugging overlapping layouts
(especially when you didn't design the parent!) - use different backgrounds!

Yes, or for Frames use a relief value to see where the frame bounds are.

Here's my changes (also found here: http://rafb.net/p/clKroD65.html )

Here is my stripped down version that does what I think you want::

   def body(self, master):
       self.title("Enter Site/Misc. Data")

       # Heading
       fLocationTitle = Frame(master, height=7)
       fLocationTitle.pack()
       Label(fLocationTitle, text="Geographic Location").pack()

       # Latitude and Longitude
       fCoords = Frame(master)
       fCoords.pack()
       Label(fCoords, text='Latitude:').grid(row=0, column=0, padx=5)
       self.lat = Entry(fCoords, width=12)
       self.lat.grid(row=0, column=1, padx=5)

       Label(fCoords, text='Longitude:').grid(row=0, column=2, padx=5 )
       self.long = Entry(fCoords, width=12)
       self.long.grid(row=0, column=3, padx=5)


I removed quirte a lot of the redundant code that was cluttering things
up and moved the frames to beside the widgets that are contained
within them.

HTH,

Alan G.
Back from vacation...


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


--
           Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

             (121.01 Deg. W, 39.26 Deg. N) GMT-8 hr std. time)


          The Obama Administration plans to double the production
          in solar energy from 1% to 2% of the total energy
          supply in the next few years. One nuclear reaction
          would do the same. Heard on Bill Wattenburg, KGO-AM

          "Less than all cannot satisfy Man." -- William Blake
          
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to