Changeset 2268d10 in sasview for sansview/perspectives


Ignore:
Timestamp:
Feb 10, 2009 12:04:46 PM (15 years ago)
Author:
Gervaise Alina <gervyh@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
16bf519
Parents:
8b30e62
Message:

help dialog window changed to frame

Location:
sansview/perspectives/fitting
Files:
1 added
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/fitpage1D.py

    r8aac6e1 r2268d10  
    9292            i+=1 
    9393             
    94         # Minimum value of data    
    95         self.data_min    = wx.StaticText(self, -1,str(format_number(numpy.min(data.x)))) 
    96         # Maximum value of data   
    97         self.data_max    =  wx.StaticText(self, -1,str(format_number(numpy.max(data.x)))) 
     94         
    9895        #Filing the sizer containing data related fields 
    9996        ix = 0 
     
    110107        #set maximum range for x in linear scale 
    111108        if not hasattr(self.data,"data"): #Display only for 1D data fit 
     109            # Minimum value of data    
     110            self.data_min    = wx.StaticText(self, -1,str(format_number(numpy.min(data.x)))) 
     111            # Maximum value of data   
     112            self.data_max    =  wx.StaticText(self, -1,str(format_number(numpy.max(data.x))))    
    112113            self.text4_3 = wx.StaticText(self, -1, 'Maximum Data Range(Linear)', style=wx.ALIGN_LEFT) 
    113114            self.sizer2.Add(self.text4_3,(iy,ix),(1,1),\ 
  • sansview/perspectives/fitting/fitting.py

    r9dd69ec r2268d10  
    9292            TODO: replace the text with a nice image 
    9393        """ 
    94         from helpDialog import  HelpWindow 
    95         dialog = HelpWindow(None, -1, 'HelpWindow') 
    96         if dialog.ShowModal() == wx.ID_OK: 
    97             pass 
    98         dialog.Destroy() 
     94        #from helpDialog import  HelpWindow 
     95        #dialog = HelpWindow(None, -1, 'HelpWindow') 
     96        #if dialog.ShowModal() == wx.ID_OK: 
     97        #    pass 
     98        #dialog.Destroy() 
     99        from helpPanel import  HelpWindow 
     100        frame = HelpWindow(None, -1, 'HelpWindow')     
     101        frame.Show(True) 
     102         
     103         
    99104         
    100105     
  • sansview/perspectives/fitting/helpPanel.py

    rb92884a r2268d10  
    6060        self.Centre() 
    6161 
    62 class HelpWindow(wx.Dialog): 
     62class HelpWindow(wx.Frame): 
    6363    def __init__(self, parent, id, title): 
    64         wx.Dialog.__init__(self, parent, id, title, size=(600, 450)) 
     64        wx.Frame.__init__(self, parent, id, title, size=(600, 450)) 
    6565         
    6666        vbox1  = wx.BoxSizer(wx.HORIZONTAL) 
     
    7676        header.SetForegroundColour('WHITE') 
    7777        hbox = wx.BoxSizer(wx.HORIZONTAL) 
    78         st = wx.StaticText(header, -1, '', (5, 5)) 
     78        st = wx.StaticText(header, -1, 'Contents', (5, 5)) 
    7979        font = st.GetFont() 
    8080        font.SetPointSize(10) 
     
    9090        headerl.SetForegroundColour('WHITE') 
    9191        hboxl = wx.BoxSizer(wx.HORIZONTAL) 
    92         lst = wx.StaticText(headerl, -1, 'Contents', (5, 5)) 
     92        lst = wx.StaticText(headerl, -1, 'Menu', (5, 5)) 
    9393        fontl = lst.GetFont() 
    9494        fontl.SetPointSize(10) 
     
    9999        self.lhelp = html.HtmlWindow(lpanel, -1, style=wx.NO_BORDER) 
    100100        self.rhelp = html.HtmlWindow(rpanel, -1, style=wx.NO_BORDER) 
    101         
     101        page1="""<html> 
     102            <body> 
     103             <p>Select topic on Menu</p> 
     104            </body> 
     105            </html>""" 
    102106        page="""<html> 
    103107            <body> 
     
    109113            <li><a href ="doc/single_fit_help.html" target ="showframe">Single Fit</a><br></li> 
    110114            <li><a href ="doc/model_use_help.html" target ="showframe">Visualize Model</a><br></li> 
     115            <li><a href ="doc/averaging_help.html" target ="showframe">Data Averaging</a><br></li> 
    111116            </ul> 
    112117            </body> 
    113118            </html>""" 
    114         
     119        self.rhelp.SetPage(page1) 
    115120        self.lhelp.SetPage(page) 
    116121        self.lhelp.Bind(wx.html.EVT_HTML_LINK_CLICKED,self.OnLinkClicked ) 
     
    132137        self.rhelp.LoadPage(link) 
    133138 
     139class ViewApp(wx.App): 
     140    def OnInit(self): 
     141        frame = HelpWindow(None, -1, 'HelpWindow')     
     142        frame.Show(True) 
     143        self.SetTopWindow(frame) 
     144         
     145        return True 
     146         
    134147 
    135 class MyApp(wx.App): 
    136     def OnInit(self): 
    137          
    138         dialog = HelpWindow(None, -1, 'HelpWindow') 
    139         if dialog.ShowModal() == wx.ID_OK: 
    140             pass 
    141         dialog.Destroy() 
    142          
    143         return 1 
    144     
    145  
    146 # end of class MyApp 
    147  
    148 if __name__ == "__main__": 
    149     app = MyApp(0) 
    150     app.MainLoop() 
    151  
    152  
     148if __name__ == "__main__":  
     149    app = ViewApp(0) 
     150    app.MainLoop()      
Note: See TracChangeset for help on using the changeset viewer.