Posted to tcl by ClayOgre at Sat Nov 10 15:36:03 GMT 2007view raw
- #the code below is for the actual creation of the widget itself for the
 - #input of the clock number.  It is in the main window.  The toplevel for the
 - #debug stuff isn't gonna be in the main program.  It is just so I can see what
 - #is happening.
 -  
 -  
 - ################################################################################
 - # the length constraint feature for the clock number entry widget was
 - # "borrowed" from the ActiveState entry3.tcl demo
 - # I don't really understand how it works yet.
 - # it is also used on the part number entry and quantity entry.
 - ################################################################################
 -  
 -     frame .clockfrm -relief groove -borderwidth 2 
 -  
 -     label .clockNumLabel -text "CLOCK #" -font mainFont
 -  
 - 	entry .clockNumInput -textvariable dataBlock(clock_submit) \
 - 		-validate key -invcmd bell -vcmd {expr {[string length %P]<6}} \
 -         -width 5 -font inputFont -justify right
 -  
 -     grid .clockNumLabel -in .clockfrm -row 1 -column 1 -sticky e -padx 11 -pady 3
 -     grid .clockNumInput -in .clockfrm -row 1 -column 2 -sticky e -padx 3  -pady 3
 -  
 - #################################################################################
 - #  This sets up what will be the global list of fields that will be saved
 - #  out when the user presses the 'SUBMIT' button. Initializes 22 elements to ""
 - #################################################################################
 -  
 - 	array set dataBlock {
 - 		date_submit        ""
 - 		time_submit        ""
 - 		clock_submit       ""
 - 		part_number        ""
 - 		part_name          ""
 - 		part_serial_number ""
 - 		setup              ""
 - 		quantity           ""
 - 		comments           ""
 - 		lk_dea_gl_flag     ""
 - 		v12_prog           ""
 - 		v8_prog            ""
 - 		v8_head            ""
 - 		cmm_clock          ""
 - 		cmm_start_date     ""
 - 		cmm_start_time     ""
 - 		cmm_end_date       ""
 - 		cmm_end_time       ""
 - 		cmm_time_on_table  ""
 - 		new_prog           ""
 - 		cmm_comments       ""
 - 		other              ""
 -  
 - 	}
 -  
 - #this is in one window that is intended to show the values of all the
 - #variables input by the user.  There is a block of code like the one below for #each of the above array elements.  
 -  
 - label .debug.dbg2  -text "CLOCK #" -relief groove -bg white
 - 		entry .debug.dgb2a -textvariable dataBlock(clock_submit) -relief groove -width 5
 - 		grid  .debug.dbg2  -row 3 -column 1 -sticky e -padx 2 -pady 3
 - 		grid  .debug.dgb2a -row 3 -column 2 -sticky w -padx 2 -pady 3
 -  
 -  
 -