9 |
|
|
10 |
from wxPython.wx import * |
from wxPython.wx import * |
11 |
|
|
12 |
|
from Thuban import _ |
13 |
|
|
14 |
from controls import SelectableRecordListCtrl |
from controls import SelectableRecordListCtrl |
15 |
|
|
16 |
class LabelListCtrl(SelectableRecordListCtrl): |
class LabelListCtrl(SelectableRecordListCtrl): |
23 |
class LabelDialog(wxDialog): |
class LabelDialog(wxDialog): |
24 |
|
|
25 |
def __init__(self, parent, table, shape_index): |
def __init__(self, parent, table, shape_index): |
26 |
wxDialog.__init__(self, parent, -1, "Label Values", wxDefaultPosition, |
wxDialog.__init__(self, parent, -1, _("Label Values"), |
27 |
|
wxDefaultPosition, |
28 |
style = wxRESIZE_BORDER|wxCAPTION|wxDIALOG_MODAL) |
style = wxRESIZE_BORDER|wxCAPTION|wxDIALOG_MODAL) |
29 |
|
|
30 |
self.parent = parent |
self.parent = parent |
34 |
top_box = wxBoxSizer(wxVERTICAL) |
top_box = wxBoxSizer(wxVERTICAL) |
35 |
|
|
36 |
self.list = LabelListCtrl(self, -1, table, shape_index) |
self.list = LabelListCtrl(self, -1, table, shape_index) |
37 |
|
self.list.SetSize(wxSize(305,200)) |
38 |
top_box.Add(self.list, 1, wxEXPAND|wxALL, 4) |
top_box.Add(self.list, 1, wxEXPAND|wxALL, 4) |
39 |
|
|
40 |
box = wxBoxSizer(wxHORIZONTAL) |
box = wxBoxSizer(wxHORIZONTAL) |
41 |
box.Add(wxButton(self, wxID_OK, "OK"), 0, wxALL, 4) |
box.Add(wxButton(self, wxID_OK, _("OK")), 0, wxALL, 4) |
42 |
box.Add(wxButton(self, wxID_CANCEL, "Cancel"), 0, wxALL, 4) |
box.Add(wxButton(self, wxID_CANCEL, _("Cancel")), 0, wxALL, 4) |
43 |
top_box.Add(box, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 10) |
top_box.Add(box, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 10) |
44 |
|
|
45 |
EVT_BUTTON(self, wxID_OK, self.OnOK) |
EVT_BUTTON(self, wxID_OK, self.OnOK) |