equal
deleted
inserted
replaced
3 |
3 |
4 # This file is part of Beremiz, a Integrated Development Environment for |
4 # This file is part of Beremiz, a Integrated Development Environment for |
5 # programming IEC 61131-3 automates supporting plcopen standard and CanFestival. |
5 # programming IEC 61131-3 automates supporting plcopen standard and CanFestival. |
6 # |
6 # |
7 # Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD |
7 # Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD |
|
8 # Copyright (C) 2017: Andrey Skvortsov <andrej.skvortzov@gmail.com> |
8 # |
9 # |
9 # See COPYING file for copyrights details. |
10 # See COPYING file for copyrights details. |
10 # |
11 # |
11 # This program is free software; you can redistribute it and/or |
12 # This program is free software; you can redistribute it and/or |
12 # modify it under the terms of the GNU General Public License |
13 # modify it under the terms of the GNU General Public License |
45 @param parent: Parent wx.Window of dialog for modal |
46 @param parent: Parent wx.Window of dialog for modal |
46 @param controller: Reference to project controller |
47 @param controller: Reference to project controller |
47 @param tagname: Tagname of project POU edited |
48 @param tagname: Tagname of project POU edited |
48 """ |
49 """ |
49 BlockPreviewDialog.__init__(self, parent, controller, tagname, |
50 BlockPreviewDialog.__init__(self, parent, controller, tagname, |
50 size=wx.Size(350, 260), title=_('Power Rail Properties')) |
51 title=_('Power Rail Properties')) |
51 |
52 |
52 # Init common sizers |
53 # Init common sizers |
53 self._init_sizers(2, 0, 5, None, 2, 1) |
54 self._init_sizers(2, 0, 5, None, 2, 1) |
54 |
55 |
55 # Create label for connection type |
56 # Create label for connection type |
85 self.RightGridSizer.AddWindow(self.Preview, flag=wx.GROW) |
86 self.RightGridSizer.AddWindow(self.Preview, flag=wx.GROW) |
86 |
87 |
87 # Add buttons sizer to sizers |
88 # Add buttons sizer to sizers |
88 self.MainSizer.AddSizer(self.ButtonSizer, border=20, |
89 self.MainSizer.AddSizer(self.ButtonSizer, border=20, |
89 flag=wx.ALIGN_RIGHT|wx.BOTTOM|wx.LEFT|wx.RIGHT) |
90 flag=wx.ALIGN_RIGHT|wx.BOTTOM|wx.LEFT|wx.RIGHT) |
|
91 self.Fit() |
90 |
92 |
91 # Left Power Rail radio button is default control having keyboard focus |
93 # Left Power Rail radio button is default control having keyboard focus |
92 self.TypeRadioButtons[LEFTRAIL].SetFocus() |
94 self.TypeRadioButtons[LEFTRAIL].SetFocus() |
93 |
95 |
94 def GetMinElementSize(self): |
96 def GetMinElementSize(self): |