Index: src/sas/sasgui/guiframe/local_perspectives/plotting/parameters_panel_boxsum.py
===================================================================
--- src/sas/sasgui/guiframe/local_perspectives/plotting/parameters_panel_boxsum.py	(revision 39f0bf40d4c6ac22a3a4e2a133263a5da2bfe588)
+++ src/sas/sasgui/guiframe/local_perspectives/plotting/parameters_panel_boxsum.py	(revision 37d461c81bb3405cd6efc6bdadfe0ecd6dc5b338)
@@ -1,11 +1,10 @@
 import wx
 import wx.lib.newevent
-#from copy import deepcopy
+from parameters_panel_slicer import SlicerParameterPanel
 from sas.sasgui.guiframe.utils import format_number
-from sas.sasgui.guiframe.events import SlicerParameterEvent
-from sas.sasgui.guiframe.events import EVT_SLICER_PARS
-from sas.sasgui.guiframe.events import EVT_SLICER
+from sas.sasgui.guiframe.panel_base import PanelBase
+from sas.sasgui.guiframe.events import (SlicerParameterEvent, EVT_SLICER_PARS,
+                                        EVT_SLICER)
 
-from sas.sasgui.guiframe.panel_base import PanelBase
 
 class SlicerPanel(wx.Panel, PanelBase):
@@ -13,9 +12,7 @@
     Panel class to show the slicer parameters
     """
-    #TODO: show units
-    #TODO: order parameters properly
-    ## Internal name for the AUI manager
+    # Internal name for the AUI manager
     window_name = "Slicer panel"
-    ## Title to appear on top of the window
+    # Title to appear on top of the window
     window_caption = "Slicer Panel"
     CENTER_PANE = False
@@ -25,5 +22,5 @@
         wx.Panel.__init__(self, parent, id, *args, **kwargs)
         PanelBase.__init__(self)
-        ##  Initialization of the class
+        # Initialization of the class
         self.base = base
         if params is None:
@@ -37,5 +34,5 @@
         self.bck = wx.GridBagSizer(5, 5)
         self.SetSizer(self.bck)
-        if type == None and params == None:
+        if type is None and params is None:
             label = "Right-click on 2D plot for slicer options"
             title = wx.StaticText(self, -1, label, style=wx.ALIGN_LEFT)
@@ -44,21 +41,7 @@
         else:
             self.set_slicer(type, params)
-        ## Bindings
-        self.parent.Bind(EVT_SLICER, self.onEVT_SLICER)
-        self.parent.Bind(EVT_SLICER_PARS, self.onParamChange)
-
-    def onEVT_SLICER(self, event):
-        """
-        Process EVT_SLICER events
-        When the slicer changes, update the panel
-
-        :param event: EVT_SLICER event
-
-        """
-        event.Skip()
-        if event.obj_class == None:
-            self.set_slicer(None, None)
-        else:
-            self.set_slicer(event.type, event.params)
+        # Bindings
+        self.parent.Bind(EVT_SLICER, SlicerParameterPanel.on_evt_slicer)
+        self.parent.Bind(EVT_SLICER_PARS, SlicerParameterPanel.on_param_change)
 
     def set_slicer(self, type, params):
@@ -68,5 +51,5 @@
         self.bck.Clear(True)
         self.type = type
-        if type == None:
+        if type is None:
             label = "Right-click on 2D plot for slicer options"
             title = wx.StaticText(self, -1, label, style=wx.ALIGN_LEFT)
@@ -84,9 +67,11 @@
             keys.sort()
             for item in keys:
-                if not item.lower() in ["num_points", "avg", "avg_error", "sum", "sum_error"]:
+                if not item.lower() in ["num_points", "avg", "avg_error", "sum",
+                                        "sum_error"]:
                     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)
+                                 flag=wx.LEFT | wx.ALIGN_CENTER_VERTICAL,
+                                 border=15)
                     ctl = wx.TextCtrl(self, -1, size=(80, 20),
                                       style=wx.TE_PROCESS_ENTER)
@@ -95,14 +80,18 @@
                     ctl.SetToolTipString(hint_msg)
                     ctl.SetValue(str(format_number(params[item])))
-                    self.Bind(wx.EVT_TEXT_ENTER, self.onTextEnter)
-                    ctl.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)
-                    ctl.Bind(wx.EVT_KILL_FOCUS, self.onTextEnter)
+                    self.Bind(wx.EVT_TEXT_ENTER, self.on_text_enter)
+                    ctl.Bind(wx.EVT_SET_FOCUS, self.on_set_focus)
+                    ctl.Bind(wx.EVT_KILL_FOCUS, self.on_text_enter)
                     self.parameters.append([item, ctl])
-                    self.bck.Add(ctl, (n - 1, 1), flag=wx.TOP | wx.BOTTOM, border=0)
+                    self.bck.Add(ctl, (n - 1, 1), flag=wx.TOP | wx.BOTTOM,
+                                 border=0)
             for item in keys:
-                if  item.lower() in ["num_points", "avg", "avg_error", "sum", "sum_error"]:
+                if item.lower() in ["num_points", "avg", "avg_error", "sum",
+                                    "sum_error"]:
                     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,
+                    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,
@@ -110,12 +99,13 @@
                                         style=wx.ALIGN_LEFT)
                     ctl.SetToolTipString("Result %s" % item)
-                    self.bck.Add(ctl, (n - 1, 1), flag=wx.TOP | wx.BOTTOM, border=0)
+                    self.bck.Add(ctl, (n - 1, 1), flag=wx.TOP | wx.BOTTOM,
+                                 border=0)
         self.bck.Layout()
         self.Layout()
-        psizer = self.parent.GetSizer()
-        if psizer != None:
-            psizer.Layout()
+        p_sizer = self.parent.GetSizer()
+        if p_sizer is not None:
+            p_sizer.Layout()
 
-    def onSetFocus(self, evt):
+    def on_set_focus(self, evt):
         """
         Highlight the txtcrtl
@@ -126,18 +116,6 @@
         # Select the whole control, after this event resolves
         wx.CallAfter(widget.SetSelection, -1, -1)
-        return
 
-    def onParamChange(self, evt):
-        """
-        Receive and event and reset the text field contained in self.parameters
-
-        """
-        evt.Skip()
-        for item in self.parameters:
-            if item[0] in evt.params:
-                item[1].SetValue(format_number(evt.params[item[0]]))
-                item[1].Refresh()
-
-    def onTextEnter(self, evt):
+    def on_text_enter(self, evt):
         """
         Parameters have changed
@@ -149,5 +127,6 @@
             try:
                 params[item[0]] = float(item[1].GetValue())
-                item[1].SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_WINDOW))
+                item[1].SetBackgroundColour(wx.SystemSettings_GetColour(
+                    wx.SYS_COLOUR_WINDOW))
                 item[1].Refresh()
             except:
@@ -155,8 +134,7 @@
                 item[1].SetBackgroundColour("pink")
                 item[1].Refresh()
-
-        if has_error == False:
+        if not has_error:
             # Post parameter event
-            ## base is guiframe is this case
+            # base is guiframe is this case
             event = SlicerParameterEvent(type=self.type, params=params)
             wx.PostEvent(self.base, event)
@@ -166,5 +144,5 @@
         On Close Event
         """
-        ID = self.uid
-        self.parent.delete_panel(ID)
+        uid = self.uid
+        self.parent.delete_panel(uid)
         self.frame.Destroy()
