Added New View
This commit is contained in:
parent
a76907e64b
commit
e2ed7fce96
4 changed files with 143 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1 +1,2 @@
|
|||
/venv/
|
||||
/#~wxg.autosave~BmsView.wxg#
|
||||
|
|
|
|||
27
BmsApp.py
Normal file
27
BmsApp.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: UTF-8 -*-
|
||||
|
||||
import wx
|
||||
import wx.propgrid
|
||||
|
||||
from BmsView import BmsMonitorFrame
|
||||
|
||||
|
||||
class BmsMonitorView(BmsMonitorFrame):
|
||||
def __init__(self, *args, **kwds):
|
||||
BmsMonitorFrame.__init__(self, *args, **kwds)
|
||||
|
||||
# end of class BmsMonitorFrame
|
||||
|
||||
class BmsApp(wx.App):
|
||||
def OnInit(self):
|
||||
self.frame = BmsMonitorView(None, wx.ID_ANY, "")
|
||||
self.SetTopWindow(self.frame)
|
||||
self.frame.Show()
|
||||
return True
|
||||
|
||||
# end of class BmsApp
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = BmsApp(0)
|
||||
app.MainLoop()
|
||||
65
BmsView.py
Normal file
65
BmsView.py
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: UTF-8 -*-
|
||||
#
|
||||
# generated by wxGlade 0.9.5 on Wed Feb 19 14:59:31 2020
|
||||
#
|
||||
|
||||
import wx
|
||||
import wx.propgrid
|
||||
|
||||
# begin wxGlade: dependencies
|
||||
# end wxGlade
|
||||
|
||||
# begin wxGlade: extracode
|
||||
# end wxGlade
|
||||
|
||||
|
||||
class BmsMonitorFrame(wx.Frame):
|
||||
def __init__(self, *args, **kwds):
|
||||
# begin wxGlade: BmsMonitorFrame.__init__
|
||||
kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE
|
||||
wx.Frame.__init__(self, *args, **kwds)
|
||||
self.SetSize((400, 576))
|
||||
self.choice_2 = wx.Choice(self, wx.ID_ANY, choices=["choice 1"])
|
||||
self.choice_1 = wx.Choice(self, wx.ID_ANY, choices=["choice 1"])
|
||||
self.property_grid_1 = wx.propgrid.PropertyGridManager(self, wx.ID_ANY)
|
||||
|
||||
self.__set_properties()
|
||||
self.__do_layout()
|
||||
# end wxGlade
|
||||
|
||||
def __set_properties(self):
|
||||
# begin wxGlade: BmsMonitorFrame.__set_properties
|
||||
self.SetTitle("frame")
|
||||
self.choice_2.SetSelection(0)
|
||||
self.choice_1.SetSelection(0)
|
||||
# end wxGlade
|
||||
|
||||
def __do_layout(self):
|
||||
# begin wxGlade: BmsMonitorFrame.__do_layout
|
||||
sizer_1 = wx.BoxSizer(wx.VERTICAL)
|
||||
sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
|
||||
sizer_2.Add(self.choice_2, 0, 0, 0)
|
||||
sizer_2.Add(self.choice_1, 0, 0, 0)
|
||||
sizer_2.Add((0, 0), 0, 0, 0)
|
||||
sizer_2.Add((0, 0), 0, 0, 0)
|
||||
sizer_1.Add(sizer_2, 0, wx.EXPAND, 0)
|
||||
sizer_1.Add(self.property_grid_1, 1, wx.EXPAND, 0)
|
||||
self.SetSizer(sizer_1)
|
||||
self.Layout()
|
||||
# end wxGlade
|
||||
|
||||
# end of class BmsMonitorFrame
|
||||
|
||||
class BmsApp(wx.App):
|
||||
def OnInit(self):
|
||||
self.frame = BmsMonitorFrame(None, wx.ID_ANY, "")
|
||||
self.SetTopWindow(self.frame)
|
||||
self.frame.Show()
|
||||
return True
|
||||
|
||||
# end of class BmsApp
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = BmsApp(0)
|
||||
app.MainLoop()
|
||||
50
BmsView.wxg
Normal file
50
BmsView.wxg
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- generated by wxGlade 0.9.5 on Wed Feb 19 14:56:52 2020 -->
|
||||
|
||||
<application class="MyApp" encoding="UTF-8" for_version="3.0" header_extension=".h" indent_amount="4" indent_symbol="space" is_template="0" language="python" mark_blocks="1" name="app" option="0" overwrite="1" path="./wxglade_out.py" source_extension=".cpp" top_window="frame" use_gettext="0" use_new_namespace="1">
|
||||
<object class="BmsMonitorFrame" name="frame" base="EditFrame">
|
||||
<size>400, 576</size>
|
||||
<title>frame</title>
|
||||
<style>wxDEFAULT_FRAME_STYLE</style>
|
||||
<object class="wxBoxSizer" name="sizer_1" base="EditBoxSizer">
|
||||
<orient>wxVERTICAL</orient>
|
||||
<object class="sizeritem">
|
||||
<option>0</option>
|
||||
<border>0</border>
|
||||
<flag>wxEXPAND</flag>
|
||||
<object class="wxBoxSizer" name="sizer_2" base="EditBoxSizer">
|
||||
<orient>wxHORIZONTAL</orient>
|
||||
<object class="sizeritem">
|
||||
<option>0</option>
|
||||
<border>0</border>
|
||||
<object class="wxChoice" name="choice_2" base="EditChoice">
|
||||
<selection>0</selection>
|
||||
<choices>
|
||||
<choice>choice 1</choice>
|
||||
</choices>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem">
|
||||
<option>0</option>
|
||||
<border>0</border>
|
||||
<object class="wxChoice" name="choice_1" base="EditChoice">
|
||||
<selection>0</selection>
|
||||
<choices>
|
||||
<choice>choice 1</choice>
|
||||
</choices>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizerslot" />
|
||||
<object class="sizerslot" />
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem">
|
||||
<option>1</option>
|
||||
<border>0</border>
|
||||
<flag>wxEXPAND</flag>
|
||||
<object class="wxPropertyGridManager" name="property_grid_1" base="EditPropertyGridManager">
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</application>
|
||||
Loading…
Add table
Reference in a new issue