Index: guiframe/local_perspectives/plotting/slicerpanel.py
===================================================================
--- guiframe/local_perspectives/plotting/slicerpanel.py	(revision 1f3655a09820a0d7ddfb8549f0b3ed9783b574ad)
+++ guiframe/local_perspectives/plotting/slicerpanel.py	(revision 0d9dae840601f23ae4dd0b9e0317056593727f90)
@@ -7,6 +7,8 @@
 from copy import deepcopy
 
-(SlicerEvent, EVT_SLICER)   = wx.lib.newevent.NewEvent()
-(SlicerParameterEvent, EVT_SLICER_PARS)   = wx.lib.newevent.NewEvent()
+from sans.guiframe.utils import format_number
+from sans.guicomm.events  import SlicerParameterEvent,EVT_SLICER_PARS,EVT_SLICER
+
+
 
 class SlicerPanel(wx.Panel):
@@ -20,7 +22,8 @@
     CENTER_PANE = False
     
-    def __init__(self, parent,id=-1,type=None, params={}, *args, **kwargs):
+    def __init__(self, parent,id=-1,type=None,base=None, params={}, *args, **kwargs):
         wx.Panel.__init__(self, parent,id, *args, **kwargs)
-        print "panel created"
+        #print "panel created", base
+        self.base= base
         self.params = params
         self.parent = parent
@@ -28,4 +31,5 @@
         self.listeners = []
         self.parameters = []
+        
         self.bck = wx.GridBagSizer(5,5)
         self.SetSizer(self.bck)
@@ -47,5 +51,5 @@
             @param event: EVT_SLICER event
         """
-        print "went here panel"
+        #print "went here panel"
         event.Skip()
         if event.obj_class==None:
@@ -62,5 +66,5 @@
         self.bck.Clear(True)  
         self.type = type  
-        print "in set slicer", type, params
+        #print "in set slicer", type, params
         if type==None:
             title = wx.StaticText(self, -1, "Right-click on 2D plot for slicer options", style=wx.ALIGN_LEFT)
@@ -78,18 +82,25 @@
             
             for item in keys:
-                n += 1
-                text = wx.StaticText(self, -1, item, style=wx.ALIGN_LEFT)
-                self.bck.Add(text, (n-1,0), flag = wx.LEFT|wx.ALIGN_CENTER_VERTICAL, border = 15)
-                ctl = wx.TextCtrl(self, -1, size=(80,20), style=wx.TE_PROCESS_ENTER)
+                if not  item.lower() in ["errors", "count"]:
+                    n += 1
+                    text = wx.StaticText(self, -1, item, style=wx.ALIGN_LEFT)
+                    self.bck.Add(text, (n-1,0), flag = wx.LEFT|wx.ALIGN_CENTER_VERTICAL, border = 15)
+                    ctl = wx.TextCtrl(self, -1, size=(80,20), style=wx.TE_PROCESS_ENTER)
+                    ctl.SetToolTipString("Modify the value of %s to change the 2D slicer" % item)
+                    ctl.SetValue(str(format_number(params[item])))
+                    #ctl.Disable()
+                    self.Bind(wx.EVT_TEXT_ENTER, self.onTextEnter)
+                    ctl.Bind(wx.EVT_KILL_FOCUS, self.onTextEnter)
+                    self.parameters.append([item, ctl])
+                    self.bck.Add(ctl, (n-1,1), flag=wx.TOP|wx.BOTTOM, border = 0)
+            for item in keys:
+                if  item.lower() in ["errors", "count"]:
+                    n += 1
+                    text = wx.StaticText(self, -1, item+": ", style=wx.ALIGN_LEFT)
+                    self.bck.Add(text, (n-1,0), flag = wx.LEFT|wx.ALIGN_CENTER_VERTICAL, border = 15)
+                    ctl = wx.StaticText(self, -1, str(format_number(params[item])), style=wx.ALIGN_LEFT)
+                    ctl.SetToolTipString("Result %s" % item)
+                    self.bck.Add(ctl, (n-1,1), flag=wx.TOP|wx.BOTTOM, border = 0)
                 
-                ctl.SetToolTipString("Modify the value of %s to change the 2D slicer" % item)
-                
-                
-                ctl.SetValue(str(params[item]))
-                ctl.Disable()
-                self.Bind(wx.EVT_TEXT_ENTER, self.onTextEnter)
-                ctl.Bind(wx.EVT_KILL_FOCUS, self.onTextEnter)
-                self.parameters.append([item, ctl])
-                self.bck.Add(ctl, (n-1,1), flag=wx.TOP|wx.BOTTOM, border = 0)
 
         self.bck.Layout()
@@ -97,20 +108,12 @@
         self.parent.GetSizer().Layout()
     def onParamChange(self, evt):
-        print "parameters changed"
+        #print "parameters changed"
         evt.Skip()
         #if evt.type == "UPDATE":
         for item in self.parameters:              
             if item[0] in evt.params:
-                item[1].SetValue("%-5.3g" %evt.params[item[0]])
+                item[1].SetValue(format_number(evt.params[item[0]]))
                 item[1].Refresh()
-        
-
-    def old_onParamChange(self, evt):
-        evt.Skip()
-        if evt.type == "UPDATE":
-            for item in self.parameters:              
-                if item[0] in evt.params:
-                    item[1].SetValue("%-5.3g" %evt.params[item[0]])
-                    item[1].Refresh()
+   
         
     def onTextEnter(self, evt): 
@@ -133,7 +136,7 @@
         if has_error==False:
             # Post parameter event
-            print "post new param"
+            #print "post new param"
             event = SlicerParameterEvent(type=self.type, params=params)
-            wx.PostEvent(self.parent, event)
-            print "self parent ", self.parent
+            wx.PostEvent(self.base, event)
+            #print "panel slicer: self base ", self.base
         
