Title: Signature.html
The code below is clearly not shifting the contents of the frame to the left. It's supposed to look like

          Geographic Location
Latitude BOX  Longitude BOX
         OK             Cancel

but instead looks like:
          Geographic Location
       Latitude                BOX  Longitude BOX
         OK             Cancel

Where BOX is just a data entry field. I've deliberately made the label size big enough so as not to obscure what happens with default values. A 30x5 size. That is if I remove the size options, then it looks OK. I don't think it really gets shift to the left though even though it looks like it does.  Comments?

# Framing it
from   Tkinter import *
from   tkSimpleDialog import Dialog
import tkSimpleDialog
import tkMessageBox

class DialogPrototype(Dialog):

    def body(self, master):

        # Frames
        fLocationTitle = Frame(master,)  # fL... f for frame
        fLocationTitle.pack()
        fLocation=Frame(master)
        fLocation.pack()
        fCoords = Frame(fLocation)      # lat/long coords in a frame
        fCoords.pack()

       
        self.title("Enter Site/Misc. Data")

        # Latitude and Longitude

        Label(fLocationTitle, text="Geographic Location").grid(row=0,column=0)
        #Label(fCoords, text='Latitude:').grid(row=0, sticky=W)
        self.lab=Label(fCoords, text='Latitude:',width=30, height=5)
        self.lab.grid(row=0, sticky=W)
        self.lat = Entry(fCoords, width=12)
        self.lat.grid(row=0, column=1)
       
        Label(fCoords, text='Longitude:').grid(row=0, column=2)
        self.long = Entry(fCoords, width=12)
        self.long.grid(row=0, column=3)

        return
   
    def apply(self):
        print "apply"
        print self.lat.get()
        print self.long.get()

    print "setting"
    lat=1.0
    long=0.0

root = Tk()
root.withdraw()
DialogPrototype(root)
--
           Wayne Watson (Watson Adventures, Prop., Nevada City, CA)

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


                Life is one damn thing after another."
                     -- Mark Twain 
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to