Index: sansview/perspectives/fitting/basepage.py
===================================================================
--- sansview/perspectives/fitting/basepage.py	(revision 376916c3539d404b91d40c03085a6603a86cae42)
+++ sansview/perspectives/fitting/basepage.py	(revision 77e23a277065abfa7478a1e115ec43af5a79dcc2)
@@ -29,4 +29,6 @@
         ## parent of the page
         self.parent = parent
+        ## manager is the fitting plugin
+        self.manager=None
         ## owner of the page (fitting plugin)
         self.event_owner= None
@@ -70,4 +72,5 @@
             self.data = self.page_info.data
             self.event_owner = self.page_info.event_owner
+            self.manager=self.page_info.manager
             
             if self.model !=None:
@@ -356,8 +359,33 @@
      
     def onSetFocus(self, evt):
+        """
+            highlight the current textcrtl and hide the error text control shown 
+            after fitting
+        """
+        if hasattr(self,"text2_3"):
+            self.text2_3.Hide()
+        if len(self.parameters)>0:
+            for item in self.parameters:
+                ## hide statictext +/-    
+                if item[3]!=None:
+                    item[3].Hide()
+                ## hide textcrtl  for error after fit
+                if item[4]!=None:
+                    item[4].Clear()
+                    item[4].Hide()
+        if len(self.fittable_param)>0:
+            for item in self.fittable_param:
+                ## hide statictext +/-    
+                if item[3]!=None:
+                    item[3].Hide()
+                ## hide textcrtl  for error after fit
+                if item[4]!=None:
+                    item[4].Clear()
+                    item[4].Hide()
+        self.Layout()
         # Get a handle to the TextCtrl
         widget = evt.GetEventObject()
         # Select the whole control, after this event resolves
-        wx.CallAfter(widget.SetSelection, -1, -1)
+        wx.CallAfter(widget.SetSelection, -1,-1)
         return
     
@@ -414,4 +442,5 @@
         """
         if self.model !=None:
+            
             # Flag to register when a parameter has changed.
             is_modified = False
@@ -723,9 +752,9 @@
             self.model= MultiplicationModel(form_factor(),struct_factor())
 
-        self.set_model_param_sizer(self.model)
+        self._on_select_model(event=None)
         self.sizer4_4.Clear()
         self.sizer4.Layout()
             
-        self._draw_model()
+        
         self.set_scroll()
         
@@ -752,5 +781,5 @@
         except:
             pass
-        wx.EVT_COMBOBOX(combobox,-1, self._on_select_model) 
+        #wx.EVT_COMBOBOX(combobox,-1, self._on_select_model) 
         return 0
    
@@ -802,12 +831,37 @@
         for item in list:
             try:
+                name = str(item[1])
                 if hasattr(self,"text2_3"):
                     self.text2_3.Hide()
+                ## check model parameters range
+                ## check minimun value
+                param_min= None
+                param_max= None
+                if item[5]!= None:
+                    if format_number(item[5].GetValue())!="NaN":
+                        param_min = float(item[5].GetValue())
+                    self.model.details[name][1]=param_min
+                ## check maximum value
+                if item[6]!= None:
+                    if format_number(item[6].GetValue())!="NaN":
+                        param_max = float(item[6].GetValue())
+                        
+                from sans.guiframe.utils import check_value
+                if param_min != None and param_max !=None:
+                    if check_value(item[5], item[6]):
+                        self.model.details[name][1:]=param_min,param_max
+                    else:
+                        msg= "Wrong Fit range entered for parameter "
+                        msg+= "name %s of model %s "%(name, self.model.name)
+                        wx.PostEvent(self.parent.parent, StatusEvent(status = msg ))
+                        self.model.details[name][1:]=param_min,param_max
+                ## hide statictext +/-    
                 if item[3]!=None:
                     item[3].Hide()
+                ## hide textcrtl  for error after fit
                 if item[4]!=None:
                     item[4].Clear()
                     item[4].Hide()
-                name = str(item[1])
+                
                 value= float(item[2].GetValue())
                 # If the value of the parameter has changed,
Index: sansview/perspectives/fitting/fitpage.py
===================================================================
--- sansview/perspectives/fitting/fitpage.py	(revision 376916c3539d404b91d40c03085a6603a86cae42)
+++ sansview/perspectives/fitting/fitpage.py	(revision 77e23a277065abfa7478a1e115ec43af5a79dcc2)
@@ -9,5 +9,7 @@
 from sans.guicomm.events import StatusEvent   
 from sans.guiframe.utils import format_number
+
 (ModelEventbox, EVT_MODEL_BOX) = wx.lib.newevent.NewEvent()
+(FitterTypeEvent, EVT_FITTER_TYPE)   = wx.lib.newevent.NewEvent()
 _BOX_WIDTH = 80
 
@@ -43,6 +45,32 @@
         self.page_info.model= self.model
         self._on_select_model(event=None)
-            
-        
+        self.Bind(EVT_FITTER_TYPE,self._on_engine_change)
+    
+    
+    def _on_engine_change(self, event):
+        """
+            get an event containing the current name of the fit engine type
+            @param event: FitterTypeEvent containing  the name of the current engine
+        """
+        if len(self.parameters)==0:
+            return
+        for item in self.parameters:
+            if event.type =="scipy":
+                item[5].SetValue(format_number(""))
+                item[5].Hide()
+                item[6].SetValue(format_number(""))
+                item[6].Hide()
+                self.text2_min.Hide()
+                self.text2_max.Hide()
+            else:
+                item[5].Show(True)
+                item[6].Show(True)
+                self.text2_min.Show(True)
+                self.text2_max.Show(True)
+                
+        self.sizer3.Layout()
+        self.SetScrollbars(20,20,200,100)
+            
+            
     def _on_display_description(self, event):
         """
@@ -261,4 +289,5 @@
                     ctl1.SetValue(str (format_number(value)))
                     ctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)
+                    ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)
                     ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)
                     self.sizer4_4.Add(ctl1, (iy,ix),(1,1),wx.EXPAND)
@@ -286,4 +315,5 @@
                         Tctl.SetValue(str (format_number(value)))
                         Tctl.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)
+                        Tctl.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)
                         Tctl.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)
                         self.sizer4_4.Add(Tctl, (iy,ix),(1,1),
@@ -300,4 +330,5 @@
                         Tctl.SetValue(str (format_number(value)))
                         Tctl.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)
+                        Tctl.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)
                         Tctl.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)
                         self.sizer4_4.Add(Tctl, (iy,ix),(1,1),
@@ -344,5 +375,4 @@
         self.manager.set_fit_range(page= self,qmin= self.qmin_x, qmax= self.qmax_x)
         #single fit 
-        #self.manager.on_single_fit(qmin=self.qmin_x,qmax=self.qmax_x)
         self.manager.onFit()
             
@@ -373,5 +403,4 @@
             when enter value on panel redraw model according to changed
         """
-        
         self._onparamEnter_helper()
         self.compute_chisqr()
@@ -660,5 +689,5 @@
         
         
-    def set_model_param_sizer(self, model, engine_type="park"):
+    def set_model_param_sizer(self, model):
         """
             Build the panel from the model content
@@ -719,7 +748,5 @@
                             wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
         self.text2_4.Hide()
-        if  engine_type == "park":
-            self.text2_max.Show(True)
-            self.text2_min.Show(True)
+        
 
         for item in keys:
@@ -739,5 +766,6 @@
                                     style=wx.TE_PROCESS_ENTER)
                 
-                ctl1.SetValue(str (format_number(value)))
+                ctl1.SetValue(format_number(value))
+                ctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)
                 ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)
                 ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)
@@ -755,21 +783,23 @@
                 ctl2.Hide()
                 
+                param_min, param_max= self.model.details[item][1:]
                 ix += 1
                 ctl3 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH/2,20), style=wx.TE_PROCESS_ENTER)
+                ctl3.SetValue(format_number(param_min))
+                ctl3.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)
                 ctl3.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)
                 ctl3.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)
                 sizer.Add(ctl3, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
                 ctl3.Hide()
-                
+        
                 ix += 1
                 ctl4 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH/2,20), style=wx.TE_PROCESS_ENTER)
+                ctl4.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)
                 ctl4.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)
                 ctl4.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)
                 sizer.Add(ctl4, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
+                ctl4.SetValue(format_number(param_max))
                 ctl4.Hide()
-                if  engine_type == "park":
-                    ctl3.Show(True)
-                    ctl4.Show(True)
-                    
+              
                 ix +=1
                 # Units
Index: sansview/perspectives/fitting/fitpanel.py
===================================================================
--- sansview/perspectives/fitting/fitpanel.py	(revision 1328e03fb2dbb5ff0404eac3502aef46dc24fe5d)
+++ sansview/perspectives/fitting/fitpanel.py	(revision 77e23a277065abfa7478a1e115ec43af5a79dcc2)
@@ -152,5 +152,6 @@
         myinfo = PageInfo( self, data=data )
         myinfo.model_list_box = self.model_list_box.get_list()
-        myinfo.event_owner =self.event_owner 
+        myinfo.event_owner = self.event_owner 
+        myinfo.manager = self.manager
         
         if not name in self.fit_page_name :
@@ -160,7 +161,4 @@
             panel.name = name
             panel.window_name= "fitpage"
-            panel.set_manager(self.manager)
-            panel.set_owner(self.event_owner)
-            
             self.AddPage(page=panel,caption=name,select=True)
             #panel.populate_box( self.model_list_box)
@@ -215,14 +213,12 @@
         myinfo = PageInfo( self, model )
         myinfo.model_list_box = self.model_list_box.get_list()
-        myinfo.event_owner =self.event_owner
+        myinfo.event_owner = self.event_owner 
+        myinfo.manager = self.manager
         
         from modelpage import ModelPage
         panel = ModelPage(self,myinfo,page_title)
-        panel.set_manager(self.manager)
-        panel.set_owner(self.event_owner)
-        
-        
+       
         self.AddPage(page=panel,caption="Model",select=True)
-        #panel.populate_box( self.model_list_box)
+
         panel.name = page_title
         self.draw_model_name=page_title
Index: sansview/perspectives/fitting/fitting.py
===================================================================
--- sansview/perspectives/fitting/fitting.py	(revision 89ef796b5e74edc2a9fdd953974ebd8a5672265c)
+++ sansview/perspectives/fitting/fitting.py	(revision 77e23a277065abfa7478a1e115ec43af5a79dcc2)
@@ -22,4 +22,5 @@
 import time
 import thread
+
 
 (PageInfoEvent, EVT_PAGE_INFO)   = wx.lib.newevent.NewEvent()
@@ -450,9 +451,18 @@
             Add name of a closed page of fitpanel in a menu 
         """
-        # Post paramters
-        event_id = wx.NewId()
-        self.menu1.Append(event_id, name, 
-             "Show %s fit panel" % name)
-        self.closed_page_dict[event_id ]= [page_info, fitproblem]
+        if len(self.closed_page_dict)>0:
+            for k , value in self.closed_page_dict.iteritems():
+                if not name in value:
+                    # Post paramters
+                    event_id = wx.NewId()
+                    self.menu1.Append(event_id, name, "Show %s fit panel" % name)
+                    self.closed_page_dict[event_id ]= [page_info, fitproblem]
+                else:
+                    event_id= k
+                    self.closed_page_dict[k ]= [page_info, fitproblem]
+        else:
+            event_id = wx.NewId()
+            self.menu1.Append(event_id, name, "Show %s fit panel" % name)
+            self.closed_page_dict[event_id ]= [page_info, fitproblem]
         wx.EVT_MENU(self.parent,event_id,  self._open_closed_page)
         
@@ -719,7 +729,16 @@
             @param engine: the key work of the engine
         """
+        ## saving fit engine name
         self._fit_engine = engine
+        ## post a message to status bar
         wx.PostEvent(self.parent, StatusEvent(status="Engine set to: %s" % self._fit_engine))
    
+        ## Bind every open fit page with a newevent to know the current fitting engine
+        import fitpage
+        event= fitpage.FitterTypeEvent()
+        event.type = self._fit_engine
+        for key in self.page_finder.keys():
+            wx.PostEvent(key, event)
+       
    
     def _on_model_panel(self, evt):
@@ -729,12 +748,12 @@
         """
         model = evt.model
+        
         if model ==None:
             return
        
-        sim_page=self.sim_page
         current_pg = self.fit_panel.get_current_page() 
         ## make sure nothing is done on self.sim_page
         ## example trying to call set_panel on self.sim_page
-        if current_pg != sim_page:
+        if current_pg != self.sim_page :
            
             if self.page_finder[current_pg].get_model()== None :
@@ -743,8 +762,6 @@
                 self.index_model += 1  
             else:
-                
                 model.name= self.page_finder[current_pg].get_model().name
                 
-           
             metadata = self.page_finder[current_pg].get_plotted_data()
             
Index: sansview/perspectives/fitting/modelpage.py
===================================================================
--- sansview/perspectives/fitting/modelpage.py	(revision 376916c3539d404b91d40c03085a6603a86cae42)
+++ sansview/perspectives/fitting/modelpage.py	(revision 77e23a277065abfa7478a1e115ec43af5a79dcc2)
@@ -178,4 +178,5 @@
                     ctl1.SetValue(str (format_number(value)))
                     ctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)
+                    ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)
                     ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)
                     self.sizer4_4.Add(ctl1, (iy,ix),(1,1), wx.EXPAND)
@@ -192,4 +193,5 @@
                         Tctl1.SetValue(str (format_number(value)))
                         Tctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)
+                        Tctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)
                         Tctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)
                         self.sizer4_4.Add(Tctl1, (iy,ix),(1,1),
@@ -207,4 +209,5 @@
                         Tctl2.SetValue(str (format_number(value)))
                         Tctl2.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)
+                        Tctl2.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)
                         Tctl2.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)
                         self.sizer4_4.Add(Tctl2, (iy,ix),(1,1),
@@ -386,4 +389,5 @@
                 ctl1.SetValue(str (format_number(value)))
                 ctl1.Bind(wx.EVT_SET_FOCUS, self.onSetFocus)
+                ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)
                 ctl1.Bind(wx.EVT_TEXT_ENTER,self._onparamEnter)
                 
Index: sansview/perspectives/fitting/simfitpage.py
===================================================================
--- sansview/perspectives/fitting/simfitpage.py	(revision 6f023e822f5665377825081d22bbb91cbca7090b)
+++ sansview/perspectives/fitting/simfitpage.py	(revision 77e23a277065abfa7478a1e115ec43af5a79dcc2)
@@ -290,4 +290,5 @@
             Show constraint fields
         """
+        self.btAdd.Show(True)
         if len(self.constraints_list)!= 0:
             nb_fit_param = 0
@@ -511,4 +512,5 @@
         self.btAdd.Bind(wx.EVT_BUTTON, self._onAdd_constraint,id= self.btAdd.GetId())
         self.btAdd.SetToolTipString("Add another constraint?")
+        self.btAdd.Hide()
      
         
