Ignore:
Timestamp:
Nov 30, 2009, 12:34:10 AM (15 years ago)
Author:
demin
Message:

make configuration frame always visible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MultiChannelUSB/UserInterface.tcl

    r77 r78  
    6363        trace add variable [myvar polar] write [myproc polar_update]
    6464
    65         ${config(1)}.scale set 0
    66         ${config(2)}.scale set 0
    67 
    68         ${config(3)}.polar1 select
    69         ${config(3)}.polar2 select
     65        ${config(1)}.dac1 set 0
     66        ${config(1)}.dac2 set 0
     67
     68        ${config(2)}.polar1 select
     69        ${config(2)}.polar2 select
    7070    }
    7171
     
    7676        my instvar config
    7777
    78         set config(1) [labelframe ${master}.cfg1 -text {DAC 20}]
    79         set config(2) [labelframe ${master}.cfg2 -text {DAC 24}]
    80         set config(3) [labelframe ${master}.cfg3 -text {polarity inversion}]
     78        set config(1) [labelframe ${master}.cfg1 -borderwidth 1 -relief sunken -text {DAC}]
     79        set config(2) [labelframe ${master}.cfg2 -borderwidth 1 -relief sunken -text {polarity inversion}]
    8180
    8281        frame ${config(1)}.limits
    83         label ${config(1)}.limits.min -text {0V}
     82        label ${config(1)}.limits.min -text {0.0V}
    8483        label ${config(1)}.limits.max -text {-3.3V}
    85         scale ${config(1)}.scale -orient horizontal -from 0 -to 4095 -tickinterval 500 -variable [myvar dac1]
    86 
    87         frame ${config(2)}.limits
    88         label ${config(2)}.limits.min -text {0V}
    89         label ${config(2)}.limits.max -text {-3.3V}
    90         scale ${config(2)}.scale -orient horizontal -from 0 -to 4095 -tickinterval 500 -variable [myvar dac2]
    91 
    92         checkbutton ${config(3)}.polar1 -text {channel 1} -variable [myvar polar(1)]
    93         checkbutton ${config(3)}.polar2 -text {channel 2} -variable [myvar polar(2)]
    94         checkbutton ${config(3)}.polar3 -text {channel 3} -variable [myvar polar(3)]
    95 
    96         pack ${config(1)} ${config(2)} -side top -expand yes -fill x -padx 10
    97         pack ${config(3)} -side top -expand yes -fill x -padx 10
    98 
    99         pack ${config(1)}.limits.min -anchor w -side left -padx 13
    100         pack ${config(1)}.limits.max -anchor e -side right -padx 5
    101         pack ${config(1)}.limits ${config(1)}.scale -side top -expand yes -fill x
    102 
    103         pack ${config(2)}.limits.min -anchor w -side left -padx 13
    104         pack ${config(2)}.limits.max -anchor e -side right -padx 5
    105         pack ${config(2)}.limits ${config(2)}.scale -side top -expand yes -fill x
    106 
    107         pack ${config(3)}.polar1 -side left -expand yes -fill x -pady 10
    108         pack ${config(3)}.polar2 -side left -expand yes -fill x -pady 10
    109         pack ${config(3)}.polar3 -side left -expand yes -fill x -pady 10
    110 
     84
     85        scale ${config(1)}.dac1 -orient vertical -from 0 -to 4095 -tickinterval 500 -variable [myvar dac1]
     86        scale ${config(1)}.dac2 -orient vertical -from 0 -to 4095 -tickinterval 0 -variable [myvar dac2]
     87
     88        checkbutton ${config(2)}.polar1 -text {channel 1} -variable [myvar polar(1)]
     89        checkbutton ${config(2)}.polar2 -text {channel 2} -variable [myvar polar(2)]
     90        checkbutton ${config(2)}.polar3 -text {channel 3} -variable [myvar polar(3)]
     91
     92        grid ${config(1)} -sticky ns
     93        grid ${config(2)} -sticky ew -pady 7
     94
     95        pack ${config(1)}.limits.min -anchor n -side top -pady 10
     96        pack ${config(1)}.limits.max -anchor s -side bottom -pady 9
     97
     98        grid ${config(1)}.dac1 ${config(1)}.dac2 ${config(1)}.limits -sticky ns -pady 7
     99
     100        grid ${config(2)}.polar1
     101        grid ${config(2)}.polar2
     102        grid ${config(2)}.polar3
     103
     104        grid rowconfigure ${master} 0 -weight 1
     105        grid rowconfigure ${config(1)} 0 -weight 1
     106        grid rowconfigure ${config(2)} 0 -weight 1
    111107    }
    112108
     
    865861}
    866862
    867 set notebook [::blt::tabnotebook .notebook -selectforeground black -side bottom]
    868 
    869 pack $notebook -expand 1 -fill both
     863set config [frame .config]
     864set notebook [::blt::tabnotebook .notebook -borderwidth 1 -selectforeground black -side bottom]
     865
     866grid ${config} -row 0 -column 0 -sticky ns -padx 3
     867grid ${notebook} -row 0 -column 1  -sticky news -pady 5
     868
     869grid rowconfigure . 0 -weight 1
     870grid columnconfigure . 0 -weight 0  -minsize 80
     871grid columnconfigure . 1 -weight 1
    870872
    871873foreach i {0 1 2} {
     
    881883}
    882884
    883 set window [frame ${notebook}.cfg]
    884 $notebook insert end -text "Configuration" -window $window -fill both
    885 ::mca::CfgDisplay cfg -master $window
     885#set window [frame ${notebook}.cfg]
     886#$notebook insert end -text "Configuration" -window $window -fill both
     887::mca::CfgDisplay cfg -master $config
    886888
    887889set usb_handle {}
Note: See TracChangeset for help on using the changeset viewer.