ReturnReasonDialog.py
2.46 KB
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
# -*- coding: utf-8 -*-
# generated by wxGlade 0.6.3 on Wed Sep 28 10:10:39 2011
import wx
import i18n
_ = i18n.language.ugettext #use ugettext instead of getttext to avoid unicode errors
# begin wxGlade: dependencies
# end wxGlade
# begin wxGlade: extracode
# end wxGlade
class ReturnReasonDialog(wx.Dialog):
def __init__(self, parent, names):
# begin wxGlade: ReturnReasonDialog.__init__
wx.Dialog.__init__(self, parent, -1)
info = ( _("Why do you want to return the following files?")+"\n"
+ "\n".join(names) )
self.label_1 = wx.StaticText(self, -1, info)
self.label_4 = wx.StaticText(self, -1, _("Reason")+":")
self.reason = wx.TextCtrl(self, -1, "", size=(250, 80), style=wx.TE_MULTILINE|wx.TE_PROCESS_ENTER)
self.button_4 = wx.Button(self, wx.ID_YES, _("OK"))
self.button_5 = wx.Button(self, wx.ID_NO, _("Cancel"))
self.__set_properties()
self.__do_layout()
self.Bind(wx.EVT_BUTTON, self.on_ok, id=wx.ID_YES)
self.Bind(wx.EVT_BUTTON, self.on_cancel, id=wx.ID_NO)
# end wxGlade
def __set_properties(self):
# begin wxGlade: ReturnReasonDialog.__set_properties
self.SetTitle(_("Return files"))
# end wxGlade
def __do_layout(self):
# begin wxGlade: ReturnReasonDialog.__do_layout
sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
sizer_2.Add(self.label_4, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 0)
sizer_2.Add(self.reason, 0, 0, 0)
sizer_3 = wx.BoxSizer(wx.HORIZONTAL)
sizer_3.Add(self.button_4, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 0)
sizer_3.Add(self.button_5, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 0)
sizer_1 = wx.BoxSizer(wx.VERTICAL)
sizer_1.Add(self.label_1, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 1)
sizer_1.Add(sizer_2, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 1)
sizer_1.Add(sizer_3, 0, wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 1)
self.SetSizer(sizer_1)
sizer_1.Fit(self)
self.Layout()
# end wxGlade
def on_ok(self, event): # wxGlade: ReturnReasonDialog.<event_handler>
self.EndModal(wx.ID_OK)
def on_cancel(self, event): # wxGlade: ReturnReasonDialog.<event_handler>
self.EndModal(wx.ID_CANCEL)
# end of class ReturnReasonDialog