[ Song anhören ] [ Diesen Song auf mein Blog stellen ]
- Titel: konti tgouli tabghini
- Album: bache tkarhini 7rame 3lik machi haka tkhalini
- Jahr: 2008
Text:
ca]class CellCountDlg(Frame):''' define the dialog used to prompt the user for the number of cells'''
def __init__( self, parent, title, NumCols, NumRows, TotalCells ):
Frame.__init__(self) # init our parent
# if we exit with OK this will be set to 1. A zero means we pressed cancel
self.OKPressed = 0
self.ImageCount = TotalCe
# define all the variables attached to the controls
self.GridLinesX = IntVar()
self.GridLinesX.set( NumCols )
self.GridLinesY = IntVar()
self.GridLinesY.set( NumRows )
l clikhere www.noura-g5.skyblog.com
self.PadAmount = IntVar()
self.PadAmount.set( 2 )
# define the basics of the window
self.pack(expand=YES, fill=BOTH)
self.master.title('Define Cells')
# put some explanatory text on the window
Label( self, text = 'Enter the cell arrangement of the tube:',
justify=LEFT ).pack(expand=YES, fill=BOTH, side=TOP)
clickhere www.polomar-down-here.skyblog.com
# make a subframe to hold the cells across controls
XFrame = Frame( self )
XLabel = Label( XFrame, text='Cells across:', width=30 )
XLabel.pack( expand=YES, fill=BOTH, side=LEFT )
self.XEntry = Entry( XFrame, textvariable=self.GridLinesX )
self.XEntry.pack( expand=YES, fill=BOTH, side=RIGHT )
XFrame.pack(side=TOP) clickhere www.polomar.skyblog.com
# do the same thing for the cells down controls
YFrame = Frame( self )
YLabel = Label( YFrame, text='Cells down:', width=30 )
YLabel.pack( expand=YES, fill=BOTH, side=LEFT )
self.YEntry = Entry( YFrame, textvariable=self.GridLinesY )
self.YEntry.pack( expand=YES, fill=BOTH, side=RIGHT )
YFrame.pack(side=TOP)
clickhere www.polomar23.skyblog.com
# and finally for the cell padding
PadFrame = Frame( self )
PadLabel = Label( PadFrame, text='Cell padding:', width=30 )
PadLabel.pack( expand=YES, fill=BOTH, side=LEFT )
self.PadEntry = Entry( PadFrame, textvariable=self.PadAmount )
self.PadEntry.pack( expand=YES, fill=BOTH, side=RIGHT )
PadFrame.pack(side=TOP)
clickhere http://www.youtube.com/user/fdeliazi
# put OK/Cancel buttons on the dialog - parts of this lifted from TkSimpleDialog
ButtonFrame = Frame(self)
OKButton = Button( ButtonFrame, text="OK", width=10,
command=self.OnOK, default=ACTIVE )
OKButton.pack(side=LEFT, padx=5, pady=5)
CancelButton = Button( ButtonFrame, text="Cancel", width=10,
command=self.OnCancel )
CancelButton.pack(side=LEFT, padx=5, pady=5)
ButtonFrame.pack()
