1 """This module has gui customized componenet classes that are needed for proper alignment and control.
2 """
3 import wx
4 import wx.lib.scrolledpanel
5
6
39
40
41
43 """To create extension user inherits its panel from SplitterPanel class. It provided three main properties: Splitter,WorkPad,ImagePanel
44 Splitter: To control over splitter
45 WorkPad: to add widgets
46 ImagePanel: Set image
47 """
48 - def __init__(self, parent, id, size=(100,100),style=wx.SUNKEN_BORDER):
49 """Constructor of SplitterPanel
50
51 @param parent: parent container
52 @param id: id of the widget
53 @param size: size tuple
54 @param style:style for panel
55 """
56 wx.Panel.__init__(self, parent, id, (0,0),size,style)
57
58 self.Splitter = wx.SplitterWindow(self, -1)
59 self.WorkPad = wx.Panel(self.Splitter, -1)
60
61 self.ImagePanel=ScrolledPanel(self.Splitter, -1)
62
63 self.Splitter.SplitVertically(self.WorkPad, self.ImagePanel)
64
65 sizer = wx.BoxSizer()
66 sizer.Add(self.Splitter, 1, wx.EXPAND)
67 self.SetSizer(sizer)
68
70 """Set bitmap explicitly to the ScrolledPanel
71
72 @param bitmap: bitmap to set
73 @return Nothing
74 """
75 self.ImagePanel.SetBitmap(bitmap)
76