-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConfigureCategoryFrame.py
82 lines (71 loc) · 3.22 KB
/
ConfigureCategoryFrame.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# generated by wxGlade 0.6.5 on Mon Feb 6 17:54:08 2012
import wx
# begin wxGlade: extracode
# end wxGlade
class ConfigureCategoryFrame(wx.Frame):
def __init__(self, *args, **kwargs):
# begin wxGlade: ConfigureCategoryFrame.__init__
self.Category = kwargs.pop("category")
self.Configuration = kwargs.pop("configuration")
kwargs["style"] = wx.DEFAULT_FRAME_STYLE
wx.Frame.__init__(self, *args, **kwargs)
self.ItemList = wx.ListCtrl(self, -1, style=wx.LC_REPORT | wx.SUNKEN_BORDER)
self.NewItem = wx.Button(self, wx.ID_NEW, "")
#self.ItemTop = wx.Button(self, wx.ID_HIGHEST, "")
self.ItemUp = wx.Button(self, wx.ID_UP, "")
self.ItemDown = wx.Button(self, wx.ID_DOWN, "")
self.DeleteItem = wx.Button(self, wx.ID_DELETE, "")
self.EnableCapture = wx.CheckBox(self, -1, "Regex capture")
self.CapturePattern = wx.TextCtrl(self, -1, "")
self.LimitItemCount = wx.CheckBox(self, -1, "Limit amount of entries")
self.ItemLimitValue = wx.SpinCtrl(self, -1, "35", min=1, max=100)
self.ButtonOK = wx.Button(self, wx.ID_OK, "")
self.ButtonApply = wx.Button(self, wx.ID_APPLY, "")
self.ButtonCancel = wx.Button(self, wx.ID_CANCEL, "")
self.__set_properties()
self.__do_layout()
self.__do_bindings()
# end wxGlade
def __set_properties(self):
# begin wxGlade: ConfigureCategoryFrame.__set_properties
self.SetTitle("Configure %s" % self.Category[0])
self.SetSize((360, 400))
self.CapturePattern.Enable(False)
self.ItemLimitValue.Enable(False)
# end wxGlade
def __do_layout(self):
# begin wxGlade: ConfigureCategoryFrame.__do_layout
sizer_1 = wx.BoxSizer(wx.VERTICAL)
sizer_4 = wx.BoxSizer(wx.VERTICAL)
sizer_7 = wx.BoxSizer(wx.HORIZONTAL)
sizer_6 = wx.BoxSizer(wx.HORIZONTAL)
sizer_5 = wx.BoxSizer(wx.HORIZONTAL)
sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
sizer_3 = wx.BoxSizer(wx.VERTICAL)
sizer_2.Add(self.ItemList, 4, wx.EXPAND, 0)
sizer_3.Add(self.NewItem, 0, 0, 0)
sizer_3.Add(self.ItemUp, 0, 0, 0)
sizer_3.Add(self.ItemDown, 0, 0, 0)
sizer_3.Add(self.DeleteItem, 0, 0, 0)
sizer_2.Add(sizer_3, 0, wx.EXPAND, 0)
sizer_1.Add(sizer_2, 1, wx.EXPAND, 1)
sizer_5.Add(self.EnableCapture, 0, wx.EXPAND, 8)
sizer_5.Add(self.CapturePattern, 1, wx.EXPAND, 0)
sizer_4.Add(sizer_5, 1, wx.EXPAND, 0)
sizer_6.Add(self.LimitItemCount, 0, wx.EXPAND, 0)
sizer_6.Add(self.ItemLimitValue, 0, 0, 0)
sizer_4.Add(sizer_6, 1, wx.EXPAND, 0)
sizer_7.Add(self.ButtonOK, 0, wx.EXPAND | wx.ALIGN_RIGHT, 0)
sizer_7.Add(self.ButtonApply, 0, wx.EXPAND | wx.ALIGN_RIGHT, 0)
sizer_7.Add(self.ButtonCancel, 0, wx.EXPAND | wx.ALIGN_RIGHT, 0)
sizer_4.Add(sizer_7, 1, wx.ALIGN_RIGHT, 0)
sizer_1.Add(sizer_4, 0, wx.LEFT | wx.TOP | wx.EXPAND, 8)
self.SetSizer(sizer_1)
self.Layout()
# end wxGlade
def __do_bindings(self):
self.Bind(wx.EVT_CLOSE, self.OnClose)
def OnClose(self, event):
self.Destroy()