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