1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
from Tkinter import *
from StringIO import *
#Object definition START
fen1 = Tk() #Main screen
port_lbl = Label(fen1, text='Port number').grid(column =0, row =0)
port_entry = Entry(fen1).grid(column =1, row =0)
ip_lbl = Label(fen1, text='IP address').grid(column =2, row =0)
ip_entry = Entry(fen1).grid(column =3, row =0)
pat_name_lbl = Label(fen1, text='Patient name').grid(column =0, row =1)
pat_name_entry = Entry(fen1).grid(column =1, row =1)
pat_firstname_lbl = Label(fen1, text='Patient firstname').grid(column =2, row =1)
pat_firstname_entry = Entry(fen1).grid(column =3, row =1)
dw_lbl = Label(fen1, text='DW').grid(column =4, row =1)
dw_entry = Entry(fen1).grid(column =5, row =1)
weight_lbl = Label(fen1, text='Patient weight').grid(column =0, row =2)
weight_entry = Entry(fen1).grid(column =1, row =2)
date_lbl = Label(fen1, text='Date').grid(column =2, row =2)
date_entry = Entry(fen1).grid(column =3, row =2)
dialyzer_lbl = Label(fen1, text='Dialyzer type').grid(column = 4, row = 2)
dialyzer_entry = Entry(fen1).grid(column = 5, row = 2)
send_button = Button(fen1, text='Send', command = fen1.destroy).grid(column =1, row =3)
quit_button = Button(fen1, text='Quit', command = fen1.destroy).grid(column =0, row =3)
# Entry default value START
port_entry.insert(0, '7586')
ip_entry.insert(0, '192.168.10.10')
pat_name_entry.insert(0, 'Dupont')
pat_firstname_entry.insert(0, 'Durant')
dw_entry.insert(0, '70')
weight_entry.insert(0, '76')
date_entry.insert(0, '20071004')
dialyzer_entry.insert(0, 'BB-X4')
# Entry default value END
#Objects definition END
fen1.mainloop() |
Partager