[9237df4] | 1 | import wx |
---|
| 2 | |
---|
[bf66f67] | 3 | |
---|
| 4 | class HintFitPage(wx.ScrolledWindow): |
---|
[9237df4] | 5 | """ |
---|
[bf66f67] | 6 | This class provide general structure of fitpanel page |
---|
[9237df4] | 7 | """ |
---|
| 8 | ## Internal name for the AUI manager |
---|
[bf66f67] | 9 | window_name = "Hint Page" |
---|
[9237df4] | 10 | ## Title to appear on top of the window |
---|
[bf66f67] | 11 | window_caption = "Hint page " |
---|
[9237df4] | 12 | |
---|
| 13 | def __init__(self, parent): |
---|
[bf66f67] | 14 | wx.ScrolledWindow.__init__(self, parent, |
---|
| 15 | style= wx.FULL_REPAINT_ON_RESIZE ) |
---|
| 16 | |
---|
[9237df4] | 17 | msg = "right click on the data when it is highlighted " |
---|
| 18 | msg += "the select option to fit for futher options" |
---|
| 19 | self.do_layout() |
---|
[4f81342] | 20 | |
---|
[9237df4] | 21 | def do_layout(self): |
---|
| 22 | """ |
---|
[bf66f67] | 23 | Draw the page |
---|
[9237df4] | 24 | """ |
---|
[bf66f67] | 25 | name="Hint" |
---|
| 26 | box_description= wx.StaticBox(self, -1,name) |
---|
| 27 | boxsizer = wx.StaticBoxSizer(box_description, wx.VERTICAL) |
---|
[533d38d] | 28 | msg = " How to link data to the control panel: \n \n" |
---|
| 29 | msg += " First load data file from 'File' menu. \n" |
---|
| 30 | msg += " Then Highlight and right click on the data plot. \n" |
---|
| 31 | msg += " Finally, select 'Select data for fitting' in the pop-up menu. \n" |
---|
[9237df4] | 32 | self.hint_txt = wx.StaticText(self, -1, msg, style=wx.ALIGN_LEFT) |
---|
[bf66f67] | 33 | boxsizer.Add(self.hint_txt, wx.ALL|wx.EXPAND, 20) |
---|
| 34 | self.vbox = wx.BoxSizer(wx.VERTICAL) |
---|
| 35 | self.vbox.Add(boxsizer ) |
---|
| 36 | self.vbox.Layout() |
---|
| 37 | self.vbox.Fit(self) |
---|
[9237df4] | 38 | self.SetSizer(self.vbox) |
---|
[bf66f67] | 39 | self.SetScrollbars(20,20,25,65) |
---|
| 40 | self.Layout() |
---|
[8898e963] | 41 | |
---|
[00e8df8] | 42 | def createMemento(self): |
---|
| 43 | return |
---|
[bf66f67] | 44 | |
---|
| 45 | class HelpWindow(wx.Frame): |
---|
| 46 | def __init__(self, parent, id, title): |
---|
| 47 | wx.Frame.__init__(self, parent, id, title, size=(570, 400)) |
---|
| 48 | |
---|
| 49 | self.page = HintFitPage(self) |
---|
| 50 | self.Centre() |
---|
| 51 | self.Show(True) |
---|
| 52 | |
---|
| 53 | if __name__=="__main__": |
---|
| 54 | app = wx.App() |
---|
| 55 | HelpWindow(None, -1, 'HelpWindow') |
---|
| 56 | app.MainLoop() |
---|
| 57 | |
---|