Return to repo list

opet

Oblivion Proton .esp Tool
Return to HMagellan.com

commit 9d45528b7a34e0f4f32a757b6d1ca22a609d55b7
parent 56eb4d38d82e97f67e20f79ac730a9950151b70b
Author: Erik Letson <hmagellan@hmagellan.com>
Date:   Tue,  5 Jan 2021 23:24:59 -0600

posterity checkpoint - redesign incoming

Diffstat:
Msrc/opet.py | 31+++++++++++++++++++++++++------
Msrc/wxcustom.py | 4++--
2 files changed, 27 insertions(+), 8 deletions(-)

diff --git a/src/opet.py b/src/opet.py @@ -1,4 +1,5 @@ import wx +from wx.lib import scrolledpanel from . import filer, tools, wxcustom ########### @@ -84,11 +85,30 @@ class OPETFrame(wx.Frame): self.SetMenuBar(self.menu_bar) # Construct esp list - self.esp_list = wxcustom.EditableListCtrl(self) - self.esp_list.InsertColumn(0, "Enabled") - self.esp_list.InsertColumn(1, "Order") - self.esp_list.InsertColumn(2, "Filename") - self.esp_list.InsertColumn(3, "Comment") + #self.esp_list = wxcustom.EditableListCtrl(self) + #self.esp_list.InsertColumn(0, "Enabled") + #self.esp_list.InsertColumn(1, "Order") + #self.esp_list.InsertColumn(2, "Filename") + #self.esp_list.InsertColumn(3, "Comment") + #self.esp_list.InsertItem(0, "Hi") + + SM = [(False, "hi", "hello"), (False, "goodbye", "bye")] + self.scrolled_panel = scrolledpanel.ScrolledPanel(self) + spsizer = wx.BoxSizer(wx.VERTICAL) + for d in SM: + check = d[0] + lname = d[1] + com = d[2] + linesizer = wx.BoxSizer(wx.HORIZONTAL) + cbox = wx.CheckBox() + text = wx.StaticText(self, wx.ID_ANY, lname) + linesizer.Add(cbox, 0, wx.ADJUST_MINSIZE, 0) + linesizer.Add(text, 1, flag = wx.EXPAND) + spsizer.Add(linesizer) + + self.scrolled_panel.SetSizer(spsizer) + spsizer.Fit(self.scrolled_panel) + #self.scrolled_panel.SetupScrolling(scroll_y = True) def on_new_profile(self, event): pass @@ -104,4 +124,3 @@ class OPETFrame(wx.Frame): self.Close(True) def on_about(self, event): wx.MessageBox("Test", "Test test", wx.OK|wx.ICON_INFORMATION) - diff --git a/src/wxcustom.py b/src/wxcustom.py @@ -17,8 +17,8 @@ class EditableListCtrl(wx.ListCtrl, listctrl.TextEditMixin): def __init__(self, manager): # Parent initialization - super(wx.ListCtrl, self).__init__(manager, style = wx.LC_REPORT|wx.BORDER_SUNKEN) - super(listctrl.TextEditMixin, self).__init__() + wx.ListCtrl.__init__(self, manager, style = wx.LC_REPORT) + listctrl.TextEditMixin.__init__(self) # Set values self.manager = manager