Changeset 6ccf471 in tol
- Timestamp:
- Nov 13, 2008, 12:28:50 PM (18 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 6184537
- Parents:
- e5c8751
- File:
-
- 1 edited
-
tolbase/lib/byswidget/bentrydate/bentrydate.tcl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tolbase/lib/byswidget/bentrydate/bentrydate.tcl
re5c8751 r6ccf471 699 699 700 700 package provide bentrydate 1.0 701 702 #///////////////////////////////////////////////////////////////////////////// 703 proc test_bentrydate {} { 704 # 705 # PURPOSE: Funcion de test de un bentrydate 706 # 707 #///////////////////////////////////////////////////////////////////////////// 708 # defining the widgets 709 variable data 710 set data(-selected) 1 711 set formatos {{sql} {fecha tol}} 712 713 destroy .top 714 toplevel .top -width 200 -height 200 715 716 TitleFrame .top.f1 -text "Bentrydate test" 717 set f1 [ .top.f1 getframe ] 718 bentrydate $f1.bed -btextvariable data(txtbed) -btext "20081010" -bdate "20081010" 719 button $f1.bObtener -text "Obtener" -command {takeDate} 720 721 TitleFrame .top.f2 -text "Configuración" 722 set f2 [ .top.f2 getframe ] 723 blistbox $f2.bcbox -listvariable blblist 724 725 button $f2.bOk -text "Aplicar" -command {aplicar} 726 button $f2.bCancel -text "Salir" -command {salir} 727 LabelEntry $f2.leresultado -label "Fecha " -textvariable LEres -editable 0 -text "" 728 LabelEntry $f2.leformatoFecha -label "Formato" -textvariable LEforFec -editable 0 -text "" -width 40 729 730 grid .top.f1 -sticky news 731 grid $f1.bed - $f1.bObtener -sticky news 732 grid .top.f2 -sticky news -sticky news 733 grid $f2.bcbox -rowspan 2 -sticky news 734 grid $f2.leresultado -row 0 -column 1 -sticky ew 735 grid $f2.leformatoFecha -row 1 -column 1 -sticky ew 736 grid $f2.bOk $f2.bCancel -sticky news 737 738 .top.f2.f.bcbox delete 0 end 739 .top.f2.f.bcbox insert end {"Formato tol"} 740 .top.f2.f.bcbox insert end {"Formato sql"} 741 742 puts "bentrydate --> .top.f2.f.bcbox" 743 744 proc takeDate {} { 745 .top.f2.f.leresultado configure -text [ .top.f1.f.bed cget -btext ] 746 } 747 748 proc salir {} { 749 .top.f2.f.bcbox delete 1 750 .top.f2.f.bcbox delete 0 751 752 .top.f2.f.leresultado configure -text "" 753 .top.f2.f.leformatoFecha configure -text "" 754 755 destroy .top 756 } 757 758 proc aplicar {} { 759 set txtLista [.top.f2.f.bcbox curselection] 760 if {$txtLista == 0} { 761 set txtFecha [.top.f1.f.bed cget -bdate] 762 .top.f2.f.leformatoFecha configure -text [ DateTol $txtFecha ] 763 } elseif {$txtLista == 1} { 764 set txtFecha [.top.f1.f.bed cget -btext] 765 .top.f2.f.leformatoFecha configure -text [SqlFormatField $txtFecha "date" Mys "%Y%m%d"] 766 set LEforFec $txtLista 767 } else { 768 set LEforFec "Error, selecciona una fecha" 769 } 770 } 771 }
Note: See TracChangeset
for help on using the changeset viewer.
