Index: sansview/perspectives/fitting/fitpage1D.py
===================================================================
--- sansview/perspectives/fitting/fitpage1D.py	(revision a92d51b6ca47a3af1666d6c63385f9839e476a72)
+++ sansview/perspectives/fitting/fitpage1D.py	(revision f39511b8d2d22017d4b786bdab20f232c2d107eb)
@@ -25,5 +25,5 @@
 
     
-class FitPage1D(wx.Panel):
+class FitPage1D(wx.ScrolledWindow):
     """
         FitPanel class contains fields allowing to display results when
@@ -40,9 +40,9 @@
     
     def __init__(self, parent,data, *args, **kwargs):
-        wx.Panel.__init__(self, parent, *args, **kwargs)
+        wx.ScrolledWindow.__init__(self, parent, *args, **kwargs)
         """ 
             Initialization of the Panel
         """
-        self.scroll = wx.ScrolledWindow(self)
+        #self.scroll = wx.ScrolledWindow(self)
         
         self.manager = None
@@ -58,12 +58,12 @@
         
         
-        self.DataSource  =wx.StaticText(self.scroll, -1,str(data.name))
-        
-        self.modelbox = wx.ComboBox(self.scroll, -1)
+        self.DataSource  =wx.StaticText(self, -1,str(data.name))
+        
+        self.modelbox = wx.ComboBox(self, -1)
         id = wx.NewId()
-        self.btFit =wx.Button(self.scroll,id,'Fit')
+        self.btFit =wx.Button(self,id,'Fit')
         self.btFit.Bind(wx.EVT_BUTTON, self.onFit,id=id)
         self.btFit.SetToolTipString("Perform fit.")
-        self.static_line_1 = wx.StaticLine(self.scroll, -1)
+        self.static_line_1 = wx.StaticLine(self, -1)
        
         self.vbox.Add(self.sizer3)
@@ -75,10 +75,10 @@
         
         id = wx.NewId()
-        self.btClose =wx.Button(self.scroll,id,'Close')
+        self.btClose =wx.Button(self,id,'Close')
         self.btClose.Bind(wx.EVT_BUTTON, self.onClose,id=id)
         self.btClose.SetToolTipString("Close page.")
         ix = 0
         iy = 1
-        self.sizer3.Add(wx.StaticText(self.scroll, -1, 'Data Source Name : '),(iy,ix),\
+        self.sizer3.Add(wx.StaticText(self, -1, 'Data Source Name : '),(iy,ix),\
                  (1,1), wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
         ix += 1
@@ -88,5 +88,5 @@
         ix = 0
         iy += 1
-        self.sizer3.Add(wx.StaticText(self.scroll,-1,'Model'),(iy,ix),(1,1)\
+        self.sizer3.Add(wx.StaticText(self,-1,'Model'),(iy,ix),(1,1)\
                   , wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
         ix += 1
@@ -96,19 +96,19 @@
         iy = 1
         #set maximum range for x in linear scale
-        self.text4_3 = wx.StaticText(self.scroll, -1, 'Maximum Data Range(Linear)', style=wx.ALIGN_LEFT)
+        self.text4_3 = wx.StaticText(self, -1, 'Maximum Data Range(Linear)', style=wx.ALIGN_LEFT)
         self.sizer4.Add(self.text4_3,(iy,ix),(1,1),\
                    wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
         ix += 1
-        self.sizer4.Add(wx.StaticText(self.scroll, -1, 'Min'),(iy, ix),(1,1),\
+        self.sizer4.Add(wx.StaticText(self, -1, 'Min'),(iy, ix),(1,1),\
                             wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
         ix += 2
-        self.sizer4.Add(wx.StaticText(self.scroll, -1, 'Max'),(iy, ix),(1,1),\
+        self.sizer4.Add(wx.StaticText(self, -1, 'Max'),(iy, ix),(1,1),\
                             wx.EXPAND|wx.ADJUST_MINSIZE, 0)
         ix = 0
         iy += 1
-        self.sizer4.Add(wx.StaticText(self.scroll, -1, 'x range'),(iy, ix),(1,1),\
+        self.sizer4.Add(wx.StaticText(self, -1, 'x range'),(iy, ix),(1,1),\
                             wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
         ix += 1
-        self.xmin    = wx.TextCtrl(self.scroll, -1,size=(_BOX_WIDTH,20))
+        self.xmin    = wx.TextCtrl(self, -1,size=(_BOX_WIDTH,20))
         self.xmin.SetValue(format_number(numpy.min(data.x)))
         self.xmin.SetToolTipString("Minimun value of x in linear scale.")
@@ -120,5 +120,5 @@
        
         ix += 2
-        self.xmax    = wx.TextCtrl(self.scroll, -1,size=(_BOX_WIDTH,20))
+        self.xmax    = wx.TextCtrl(self, -1,size=(_BOX_WIDTH,20))
         self.xmax.SetValue(format_number(numpy.max(data.x)))
         self.xmax.SetToolTipString("Maximum value of x in linear scale.")
@@ -133,15 +133,15 @@
         ix = 0
         iy = 1
-        self.smear= wx.CheckBox(self.scroll, -1, "Fit with Smear", (10, 10))
-        wx.EVT_CHECKBOX(self.scroll, self.smear.GetId(), self.onSmear)
+        self.smear= wx.CheckBox(self, -1, "Fit with Smear", (10, 10))
+        wx.EVT_CHECKBOX(self, self.smear.GetId(), self.onSmear)
         self.sizer1.Add(self.smear,(iy,ix),(1,1),\
                    wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
         iy+=1
-        self.text1_1 = wx.StaticText(self.scroll, -1, 'Chi2/dof', style=wx.ALIGN_LEFT)
+        self.text1_1 = wx.StaticText(self, -1, 'Chi2/dof', style=wx.ALIGN_LEFT)
         #self.sizer1.Add(self.text1_1,1)
         self.sizer1.Add(self.text1_1,(iy,ix),(1,1),\
                    wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
         ix += 1
-        self.tcChi    = wx.TextCtrl(self.scroll, -1,size=(_BOX_WIDTH,20))
+        self.tcChi    = wx.TextCtrl(self, -1,size=(_BOX_WIDTH,20))
         self.tcChi.SetToolTipString("Chi^2 over degrees of freedom.")
         #self.sizer1.Add(self.tcChi, 1, wx.R | wx.BOTTOM , 5)
@@ -167,6 +167,6 @@
         self.model_list_box={}
         self.data = data
-        self.vbox.Layout()
-        
+        
+        """
         bs = wx.BoxSizer(wx.VERTICAL)
         bs.Add(self.scroll, 1, wx.EXPAND)
@@ -174,11 +174,15 @@
         self.scroll.SetSizer(self.vbox)        
         self.scroll.SetScrollbars(20,20,55,40)
-        width,height = self.GetSize()
-     
+        #width,height = self.GetSize()
+         """
+        self.vbox.Layout()
+        self.vbox.Fit(self) 
+        self.SetSizer(self.vbox)
+        self.SetScrollbars(20,20,55,40)
+        
         self.Centre()
         self.Layout()
         self.GrandParent.GetSizer().Layout()
-        print self.GetSize()
-        print self.scroll.GetSize()
+       
 
         
@@ -287,6 +291,9 @@
             if name ==event.GetString():
                 try:
-                    evt = ModelEventbox(model=item(),name=name)
+                    self.model=item()
+                    evt = ModelEventbox(model=self.model,name=name)
                     wx.PostEvent(self.event_owner, evt)
+                    #self.model= item()
+                    #self.set_panel(self.model)
                 except:
                     raise #ValueError,"model.name is not equal to model class name"
@@ -301,5 +308,5 @@
             flag=self.checkFitRange()
             if flag==True and self.model!=None:
-                print"fit page",self.xmin.GetValue(),self.xmax.GetValue()
+                #print"fit page",self.xmin.GetValue(),self.xmax.GetValue()
                 self.manager.redraw_model(float(self.xmin.GetValue())\
                                                ,float(self.xmax.GetValue()))
@@ -374,8 +381,8 @@
         iq=1
         if len(disp_list)>0:
-            disp = wx.StaticText(self.scroll, -1, 'Dispersion')
+            disp = wx.StaticText(self, -1, 'Dispersion')
             self.sizer5.Add(disp,( iq, ip),(1,1),  wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
             ip += 1 
-            values = wx.StaticText(self.scroll, -1, 'Values')
+            values = wx.StaticText(self, -1, 'Values')
             self.sizer5.Add(values,( iq, ip),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
             
@@ -383,19 +390,19 @@
         iy = 1
         ix = 0
-        self.cb1 = wx.CheckBox(self.scroll, -1,'Parameters', (10, 10))
-        wx.EVT_CHECKBOX(self.scroll, self.cb1.GetId(), self.select_all_param)
+        self.cb1 = wx.CheckBox(self, -1,'Parameters', (10, 10))
+        wx.EVT_CHECKBOX(self, self.cb1.GetId(), self.select_all_param)
         self.sizer2.Add(self.cb1,(iy, ix),(1,1),\
                           wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
         ix +=1
-        self.text2_2 = wx.StaticText(self.scroll, -1, 'Values')
+        self.text2_2 = wx.StaticText(self, -1, 'Values')
         self.sizer2.Add(self.text2_2,(iy, ix),(1,1),\
                             wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
         ix +=2
-        self.text2_3 = wx.StaticText(self.scroll, -1, 'Errors')
+        self.text2_3 = wx.StaticText(self, -1, 'Errors')
         self.sizer2.Add(self.text2_3,(iy, ix),(1,1),\
                             wx.EXPAND|wx.ADJUST_MINSIZE, 0)
         self.text2_3.Hide() 
         ix +=1
-        self.text2_4 = wx.StaticText(self.scroll, -1, 'Units')
+        self.text2_4 = wx.StaticText(self, -1, 'Units')
         self.sizer2.Add(self.text2_4,(iy, ix),(1,1),\
                             wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
@@ -407,12 +414,12 @@
                 ix = 0
     
-                cb = wx.CheckBox(self.scroll, -1, item, (10, 10))
+                cb = wx.CheckBox(self, -1, item, (10, 10))
                 cb.SetValue(False)
                 self.sizer2.Add( cb,( iy, ix),(1,1),  wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-                wx.EVT_CHECKBOX(self.scroll, cb.GetId(), self.select_param)
+                wx.EVT_CHECKBOX(self, cb.GetId(), self.select_param)
                 
                 ix += 1
                 value= self.model.getParam(item)
-                ctl1 = wx.TextCtrl(self.scroll, -1, size=(_BOX_WIDTH,20), style=wx.TE_PROCESS_ENTER)
+                ctl1 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), style=wx.TE_PROCESS_ENTER)
                 ctl1.SetValue(str (format_number(value)))
                 ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)
@@ -420,10 +427,10 @@
                 self.sizer2.Add(ctl1, (iy,ix),(1,1), wx.EXPAND)
                 ix += 1
-                text2=wx.StaticText(self.scroll, -1, '+/-')
+                text2=wx.StaticText(self, -1, '+/-')
                 self.sizer2.Add(text2,(iy, ix),(1,1),\
                                 wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
                 text2.Hide()  
                 ix += 1
-                ctl2 = wx.TextCtrl(self.scroll, -1, size=(_BOX_WIDTH,20), style=wx.TE_PROCESS_ENTER)
+                ctl2 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), style=wx.TE_PROCESS_ENTER)
                 self.sizer2.Add(ctl2, (iy,ix),(1,1), wx.EXPAND|wx.ADJUST_MINSIZE, 0)
                 ctl2.Hide()
@@ -431,19 +438,19 @@
                 # Units
                 try:
-                    units = wx.StaticText(self.scroll, -1, self.model.details[item][0], style=wx.ALIGN_LEFT)
+                    units = wx.StaticText(self, -1, self.model.details[item][0], style=wx.ALIGN_LEFT)
                 except:
-                    units = wx.StaticText(self.scroll, -1, "", style=wx.ALIGN_LEFT)
+                    units = wx.StaticText(self, -1, "", style=wx.ALIGN_LEFT)
                 self.sizer2.Add(units, (iy,ix),(1,1),  wx.EXPAND|wx.ADJUST_MINSIZE, 0)
             else:
                 ip = 0
                 iq += 1
-                cb = wx.CheckBox(self.scroll, -1, item, (10, 10))
+                cb = wx.CheckBox(self, -1, item, (10, 10))
                 cb.SetValue(False)
                 self.sizer5.Add( cb,( iq, ip),(1,1),  wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
-                wx.EVT_CHECKBOX(self.scroll, cb.GetId(), self.select_param)
+                wx.EVT_CHECKBOX(self, cb.GetId(), self.select_param)
                 
                 ip += 1
                 value= self.model.getParam(item)
-                ctl1 = wx.TextCtrl(self.scroll, -1, size=(_BOX_WIDTH,20), style=wx.TE_PROCESS_ENTER)
+                ctl1 = wx.TextCtrl(self, -1, size=(_BOX_WIDTH,20), style=wx.TE_PROCESS_ENTER)
                 ctl1.SetValue(str (format_number(value)))
                 ctl1.Bind(wx.EVT_KILL_FOCUS, self._onparamEnter)
Index: sansview/perspectives/fitting/fitpage2D.py
===================================================================
--- sansview/perspectives/fitting/fitpage2D.py	(revision 57668f8d8031518b8e4c968a15699310b27c3d36)
+++ sansview/perspectives/fitting/fitpage2D.py	(revision f39511b8d2d22017d4b786bdab20f232c2d107eb)
@@ -25,5 +25,5 @@
 
     
-class FitPage2D(wx.Panel):
+class FitPage2D(wx.ScrolledWindow):
     """
         FitPanel class contains fields allowing to display results when
@@ -40,5 +40,5 @@
     
     def __init__(self, parent,data, *args, **kwargs):
-        wx.Panel.__init__(self, parent, *args, **kwargs)
+        wx.ScrolledWindow.__init__(self, parent, *args, **kwargs)
         """ 
             Initialization of the Panel
@@ -185,4 +185,5 @@
         self.vbox.Fit(self) 
         self.SetSizer(self.vbox)
+        self.SetScrollbars(20,20,55,40)
         self.Centre()
         
Index: sansview/perspectives/fitting/fitpanel.py
===================================================================
--- sansview/perspectives/fitting/fitpanel.py	(revision b2c32257ddc4cfe44d56a13bf563eeeba2022ca2)
+++ sansview/perspectives/fitting/fitpanel.py	(revision f39511b8d2d22017d4b786bdab20f232c2d107eb)
@@ -43,5 +43,9 @@
         self.fit_page_name=None
         self.draw_model_name=None
-        self.page_name="Model View"
+        #model page info
+        self.model_page_number=None
+        self.page_name=None
+        self.model_page=None
+        #updating the panel
         self.nb.Update()
         self.SetSizer(self.sizer)
@@ -95,4 +99,15 @@
             return panel
         
+    def _help_add_model_page(self,model,description,page_title):
+        from modelpage import ModelPage
+        panel = ModelPage(self.nb,model, -1)
+        panel.set_manager(self.manager)
+        panel.set_owner(self.event_owner)
+        self.nb.AddPage(page=panel,text=page_title,select=True)
+        panel.populate_box( self.model_list_box)
+        self.draw_model_name=page_title
+        self.model_page_number=self.nb.GetSelection()
+        self.model_page=self.nb.GetPage(self.nb.GetSelection())
+        
         
     def add_model_page(self,model,description,page_title):
@@ -103,6 +118,17 @@
             @param page_title: the name of the page
         """
-        if  page_title !=self.draw_model_name or self.draw_model_name ==None: 
-            self.onClose()
+        if  self.draw_model_name ==None:
+            # or  self.draw_model_name !=page_title: 
+            #print "removing the prevois model page ",self.model_page, self.model_page_number
+            #self.onClose(self.model_page, self.model_page_number)
+            self._help_add_model_page(model,description,page_title)
+        else:
+            if  self.draw_model_name !=page_title: 
+                self.onClose(self.model_page, self.model_page_number)
+                #print "removing the prevois model page ",self.model_page, self.model_page_number
+                self._help_add_model_page(model,description,page_title)
+        """
+        if  self.draw_model_name ==None : 
+            
             from modelpage import ModelPage
             panel = ModelPage(self.nb,model, -1)
@@ -112,4 +138,6 @@
             panel.populate_box( self.model_list_box)
             self.draw_model_name=page_title
+            self.model_page_number = self.nb.GetPage(self.nb.GetSelection())
+            print "model page",self.model_page_number,self.nb.GetSelection()
         else:
             for i in range(self.nb.GetPageCount()):
@@ -118,4 +146,5 @@
                     page.set_page(model,description)
                     break
+        """
                 
            
@@ -150,9 +179,15 @@
         return self.nb.GetPage(self.nb.GetSelection())
     
-    def onClose(self):
+    def onClose(self, page=None,page_number=None):
         """
              close the current page except the simpage. remove each check box link to the model
              selected on that page. remove its reference into page_finder (fitting module)
         """
+        if page!=None and page_number!=None:
+            page.Destroy()
+            self.nb.RemovePage(page_number)
+            self.model_page_number=None
+            self.model_page=None
+            return 
         try:
             sim_page = self.nb.GetPage(0)
@@ -179,5 +214,5 @@
         except:
             raise
-        print "fitpanel", self.draw_model_name 
+        #print "fitpanel", self.draw_model_name 
         
     def set_model_list(self,dict):
Index: sansview/perspectives/fitting/fitting.py
===================================================================
--- sansview/perspectives/fitting/fitting.py	(revision b2c32257ddc4cfe44d56a13bf563eeeba2022ca2)
+++ sansview/perspectives/fitting/fitting.py	(revision f39511b8d2d22017d4b786bdab20f232c2d107eb)
@@ -58,8 +58,5 @@
         #menu for model
         menu2 = wx.Menu()
-        id4 = wx.NewId()
-        menu2.AppendCheckItem(id4, "model view 2D") 
-        wx.EVT_MENU(owner, id4, self.on_draw_model2D)
-        
+    
         self.menu_mng.populate_menu(menu2, owner)
         id2 = wx.NewId()
@@ -351,5 +348,5 @@
             result=self.fitter.fit()
             #self._single_fit_completed(result,pars,current_pg,qmin,qmax)
-            print "single_fit: result",result.fitness,result.pvec,result.stderr
+            #print "single_fit: result",result.fitness,result.pvec,result.stderr
             #self._single_fit_completed(result,pars,page,qmin,qmax)
             self._single_fit_completed(result,pars,page_fitted,qmin,qmax,ymin,ymax)
@@ -577,50 +574,69 @@
         
         model=evt.model()
-        name="Model View"
-        print "mon menu",model.name
+        #name="Model View"
+        #print "mon menu",model.name
         description=model.description
-        #self.fit_panel.add_model_page(model,description,model.name)   
-        self.fit_panel.add_model_page(model,description,name)          
+        #self.fit_panel.add_model_page(model,description,name)   
+            
         self.draw_model(model,self.enable_model2D)
         
-    def draw_model(self,model,enable2D=False):
+    def draw_model(self,model,description=None, enable2D=False,qmin=None, qmax=None):
         """
              draw model with default data value
         """
-        x = numpy.arange(0.001, 1.0, 0.001)
-        xlen = len(x)
-        y = numpy.zeros(xlen)
-        if not enable2D:
-            for i in range(xlen):
-                y[i] = model.run(x[i])
-    
-            try:
-                new_plot = Theory1D(x, y)
-                new_plot.name = model.name
-                #new_plot.name = "Model"
-                new_plot.xaxis("\\rm{Q}", 'A^{-1}')
-                new_plot.yaxis("\\rm{Intensity} ","cm^{-1}")
-                 
-                new_plot.group_id ="Fitness"
-                wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, title="Analytical model 1D"))
-                
-            except:
-                raise
+        self.fit_panel.add_model_page(model,model.description,model.name) 
+        #x = numpy.arange(0.001, 1.0, 0.001)
+        #y = numpy.arange(0.001, 1.0, 0.001)
+        x = numpy.arange(-0.05, 0.05, 0.001)
+        y = numpy.arange(-0.05, 0.05, 0.001)
+        print "went here ",enable2D
+        if enable2D:
+            data=numpy.zeros([len(x),len(y)])
+            for i in range(len(y)):
+                for j in range(len(x)):
+                    data[i][j]=model.runXY([j,i])
+            theory = Theory2D(data)  
+            theory.group_id =str(model.name)+" 2D"
+            theory.xmin=-0.05
+            theory.xmax= 0.05
+            theory.ymin= -0.05
+            theory.ymax= 0.05
+            wx.PostEvent(self.parent, NewPlotEvent(plot=theory, title="Analytical model 2D"))
         else:
-            for i in range(xlen):
-                y[i] = model.run(x[i])
-    
-            try:
-                new_plot = Theory1D(x, y)
-                new_plot.name = model.name
-                #new_plot.name = "Model"
-                new_plot.xaxis("\\rm{Q}", 'A^{-1}')
-                new_plot.yaxis("\\rm{Intensity} ","cm^{-1}")
-                 
-                new_plot.group_id ="Fitness"
-                wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, title="Analytical model 1D"))
-                
-            except:
-                raise
+            x = numpy.arange(0.001, 1.0, 0.001)        
+            xlen= len(x)
+            y = numpy.zeros(xlen)
+            if not enable2D:
+                for i in range(xlen):
+                    y[i] = model.run(x[i])
+        
+                try:
+                    new_plot = Theory1D(x, y)
+                    #new_plot.name = model.name
+                    new_plot.name = "Model"
+                    new_plot.xaxis("\\rm{Q}", 'A^{-1}')
+                    new_plot.yaxis("\\rm{Intensity} ","cm^{-1}")
+                     
+                    new_plot.group_id ="Fitness"
+                    wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, title="Analytical model 1D"))
+                    
+                except:
+                    raise
+            else:
+                for i in range(xlen):
+                    y[i] = model.run(x[i])
+        
+                try:
+                    new_plot = Theory1D(x, y)
+                    new_plot.name = model.name
+                    #new_plot.name = "Model"
+                    new_plot.xaxis("\\rm{Q}", 'A^{-1}')
+                    new_plot.yaxis("\\rm{Intensity} ","cm^{-1}")
+                     
+                    new_plot.group_id ="Fitness"
+                    wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, title="Analytical model 1D"))
+                    
+                except:
+                    raise
     def on_draw_model2D(self, event):
         """
Index: sansview/perspectives/fitting/modelpage.py
===================================================================
--- sansview/perspectives/fitting/modelpage.py	(revision b2c32257ddc4cfe44d56a13bf563eeeba2022ca2)
+++ sansview/perspectives/fitting/modelpage.py	(revision f39511b8d2d22017d4b786bdab20f232c2d107eb)
@@ -25,5 +25,5 @@
 
     
-class ModelPage(wx.Panel):
+class ModelPage(wx.ScrolledWindow):
     """
         FitPanel class contains fields allowing to display results when
@@ -40,8 +40,9 @@
     
     def __init__(self, parent,model, *args, **kwargs):
-        wx.Panel.__init__(self, parent, *args, **kwargs)
+        wx.ScrolledWindow.__init__(self, parent, *args, **kwargs)
         """ 
             Initialization of the Panel
         """
+        #self.scroll = wx.ScrolledWindow(self)
         self.manager = None
         self.parent  = parent
@@ -78,4 +79,10 @@
         ix += 1
         self.sizer3.Add(self.modelbox,(iy,ix),(1,1),  wx.EXPAND|wx.ADJUST_MINSIZE, 0)
+        ix = 0
+        iy += 1
+        self.model_view= wx.CheckBox(self, -1, "View in 2D", (10, 10))
+        wx.EVT_CHECKBOX(self, self.model_view.GetId(), self.onModel2D)
+        self.sizer3.Add(self.model_view,(iy,ix),(1,1),\
+                   wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15)
         # contains link between  model ,all its parameters, and panel organization
         self.parameters=[]
@@ -85,5 +92,5 @@
         self.model=model
         try:
-            print"init modelpage",model.name
+            #print"init modelpage",model.name
             self.set_panel(model)
         except:
@@ -100,5 +107,7 @@
         self.vbox.Layout()
         self.vbox.Fit(self) 
+        
         self.SetSizer(self.vbox)
+        self.SetScrollbars(20,20,55,40)
         self.Centre()
        
@@ -122,5 +131,10 @@
         """
         self.manager = manager
-  
+    def onModel2D(self, event):
+        
+        if self.model_view.GetValue()==True:
+            print "2D model"
+            self.manager.draw_model(self.model,
+                                    description=None, enable2D=True,qmin=None, qmax=None)
     def populate_box(self, dict):
         """
@@ -167,11 +181,12 @@
             if hasattr(items, "name"):
                 name = items.name
-            print "fitpage: _on_select_model model name",name ,event.GetString()
+            #print "fitpage: _on_select_model model name",name ,event.GetString()
             if name ==event.GetString():
                 model=items
-                print "fitpage: _on_select_model model name",name ,event.GetString()
+                #print "fitpage: _on_select_model model name",name ,event.GetString()
                 self.model= model
+                self.set_panel(model)
                 self.manager.draw_model(model)
-                self.set_panel(model)
+                
     def set_model_name(self,name):
         """ 
@@ -233,5 +248,5 @@
             
         disp_list.sort()
-        print "went here",self.model.name,model.description
+        #print "went here",self.model.name,model.description
         iy = 1
         ix = 0
Index: sansview/perspectives/fitting/models.py
===================================================================
--- sansview/perspectives/fitting/models.py	(revision a92d51b6ca47a3af1666d6c63385f9839e476a72)
+++ sansview/perspectives/fitting/models.py	(revision f39511b8d2d22017d4b786bdab20f232c2d107eb)
@@ -104,4 +104,7 @@
         from sans.models.DABModel import DABModel
         self.indep_model.append(DABModel )
+        
+        from sans.models.GuinierModel import GuinierModel
+        self.indep_model.append(GuinierModel )
         
         from sans.models.DebyeModel import DebyeModel
