Index: trunk/MultiChannelUSB/UserInterface.tcl
===================================================================
--- trunk/MultiChannelUSB/UserInterface.tcl	(revision 77)
+++ trunk/MultiChannelUSB/UserInterface.tcl	(revision 78)
@@ -63,9 +63,9 @@
         trace add variable [myvar polar] write [myproc polar_update]
 
-        ${config(1)}.scale set 0
-        ${config(2)}.scale set 0
-
-        ${config(3)}.polar1 select
-        ${config(3)}.polar2 select
+        ${config(1)}.dac1 set 0
+        ${config(1)}.dac2 set 0
+
+        ${config(2)}.polar1 select
+        ${config(2)}.polar2 select
     }
 
@@ -76,37 +76,33 @@
         my instvar config
 
-        set config(1) [labelframe ${master}.cfg1 -text {DAC 20}]
-        set config(2) [labelframe ${master}.cfg2 -text {DAC 24}]
-        set config(3) [labelframe ${master}.cfg3 -text {polarity inversion}]
+        set config(1) [labelframe ${master}.cfg1 -borderwidth 1 -relief sunken -text {DAC}]
+        set config(2) [labelframe ${master}.cfg2 -borderwidth 1 -relief sunken -text {polarity inversion}]
 
         frame ${config(1)}.limits
-        label ${config(1)}.limits.min -text {0V}
+        label ${config(1)}.limits.min -text {0.0V}
         label ${config(1)}.limits.max -text {-3.3V}
-        scale ${config(1)}.scale -orient horizontal -from 0 -to 4095 -tickinterval 500 -variable [myvar dac1]
-
-        frame ${config(2)}.limits
-        label ${config(2)}.limits.min -text {0V}
-        label ${config(2)}.limits.max -text {-3.3V}
-        scale ${config(2)}.scale -orient horizontal -from 0 -to 4095 -tickinterval 500 -variable [myvar dac2]
-
-        checkbutton ${config(3)}.polar1 -text {channel 1} -variable [myvar polar(1)]
-        checkbutton ${config(3)}.polar2 -text {channel 2} -variable [myvar polar(2)]
-        checkbutton ${config(3)}.polar3 -text {channel 3} -variable [myvar polar(3)]
-
-        pack ${config(1)} ${config(2)} -side top -expand yes -fill x -padx 10
-        pack ${config(3)} -side top -expand yes -fill x -padx 10
-
-        pack ${config(1)}.limits.min -anchor w -side left -padx 13
-        pack ${config(1)}.limits.max -anchor e -side right -padx 5
-        pack ${config(1)}.limits ${config(1)}.scale -side top -expand yes -fill x
-
-        pack ${config(2)}.limits.min -anchor w -side left -padx 13
-        pack ${config(2)}.limits.max -anchor e -side right -padx 5
-        pack ${config(2)}.limits ${config(2)}.scale -side top -expand yes -fill x
-
-        pack ${config(3)}.polar1 -side left -expand yes -fill x -pady 10
-        pack ${config(3)}.polar2 -side left -expand yes -fill x -pady 10
-        pack ${config(3)}.polar3 -side left -expand yes -fill x -pady 10
-
+
+        scale ${config(1)}.dac1 -orient vertical -from 0 -to 4095 -tickinterval 500 -variable [myvar dac1]
+        scale ${config(1)}.dac2 -orient vertical -from 0 -to 4095 -tickinterval 0 -variable [myvar dac2]
+
+        checkbutton ${config(2)}.polar1 -text {channel 1} -variable [myvar polar(1)]
+        checkbutton ${config(2)}.polar2 -text {channel 2} -variable [myvar polar(2)]
+        checkbutton ${config(2)}.polar3 -text {channel 3} -variable [myvar polar(3)]
+
+        grid ${config(1)} -sticky ns
+        grid ${config(2)} -sticky ew -pady 7
+
+        pack ${config(1)}.limits.min -anchor n -side top -pady 10
+        pack ${config(1)}.limits.max -anchor s -side bottom -pady 9
+
+        grid ${config(1)}.dac1 ${config(1)}.dac2 ${config(1)}.limits -sticky ns -pady 7
+
+        grid ${config(2)}.polar1
+        grid ${config(2)}.polar2
+        grid ${config(2)}.polar3
+
+        grid rowconfigure ${master} 0 -weight 1
+        grid rowconfigure ${config(1)} 0 -weight 1
+        grid rowconfigure ${config(2)} 0 -weight 1
     }
 
@@ -865,7 +861,13 @@
 }
 
-set notebook [::blt::tabnotebook .notebook -selectforeground black -side bottom]
-
-pack $notebook -expand 1 -fill both
+set config [frame .config]
+set notebook [::blt::tabnotebook .notebook -borderwidth 1 -selectforeground black -side bottom]
+
+grid ${config} -row 0 -column 0 -sticky ns -padx 3
+grid ${notebook} -row 0 -column 1  -sticky news -pady 5
+
+grid rowconfigure . 0 -weight 1
+grid columnconfigure . 0 -weight 0  -minsize 80
+grid columnconfigure . 1 -weight 1
 
 foreach i {0 1 2} {
@@ -881,7 +883,7 @@
 }
 
-set window [frame ${notebook}.cfg]
-$notebook insert end -text "Configuration" -window $window -fill both
-::mca::CfgDisplay cfg -master $window
+#set window [frame ${notebook}.cfg]
+#$notebook insert end -text "Configuration" -window $window -fill both
+::mca::CfgDisplay cfg -master $config
 
 set usb_handle {}
