mirror of https://github.com/chriskiehl/Gooey.git
Chris
2 years ago
9 changed files with 173 additions and 113 deletions
Split View
Diff Options
-
8gooey/gui/components/config.py
-
14gooey/gui/components/widgets/bases.py
-
83gooey/gui/components/widgets/beep_boop.py
-
1gooey/gui/components/widgets/commands.py
-
11gooey/gui/components/widgets/radio_group.py
-
21gooey/gui/containers/application.py
-
4gooey/gui/state.py
-
3gooey/python_bindings/argparse_to_json.py
-
141gooey/python_bindings/types.py
@ -1,83 +0,0 @@ |
|||
import wx # type: ignore |
|||
|
|||
import wx.lib.inspection |
|||
from gooey.gui.components.widgets.textfield import TextField |
|||
from gooey.gui.components.widgets.textarea import Textarea |
|||
from gooey.gui.components.widgets.password import PasswordField |
|||
from gooey.gui.components.widgets.choosers import FileChooser, FileSaver, DirChooser, DateChooser |
|||
from gooey.gui.components.widgets.dropdown import Dropdown |
|||
from gooey.gui.components.widgets.listbox import Listbox |
|||
|
|||
|
|||
class CCC(wx.Frame): |
|||
def __init__(self, *args, **kwargs): |
|||
super(CCC, self).__init__(*args, **kwargs) |
|||
x = {'data':{'choices':['one', 'tw'], 'display_name': 'foo', 'help': 'bar', 'commands': ['-t']}, 'id': 1, 'options': {}} |
|||
|
|||
a = TextField(self, x) |
|||
c = Textarea(self, x) |
|||
b = PasswordField(self, x) |
|||
d = DirChooser(self, x) |
|||
e = FileChooser(self,x) |
|||
f = FileSaver(self, x) |
|||
g = DateChooser(self, x) |
|||
h = Dropdown(self, x) |
|||
i = Listbox(self, x) |
|||
|
|||
s = wx.BoxSizer(wx.VERTICAL) |
|||
s.Add(a, 0, wx.EXPAND) |
|||
s.Add(b, 0, wx.EXPAND) |
|||
s.Add(c, 0, wx.EXPAND) |
|||
s.Add(d, 0, wx.EXPAND) |
|||
s.Add(e, 0, wx.EXPAND) |
|||
s.Add(f, 0, wx.EXPAND) |
|||
s.Add(g, 0, wx.EXPAND) |
|||
s.Add(h, 0, wx.EXPAND) |
|||
s.Add(i, 0, wx.EXPAND) |
|||
|
|||
self.SetSizer(s) |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
app = wx.App() |
|||
|
|||
frame = CCC(None, -1, 'simple.py') |
|||
frame.Show() |
|||
|
|||
app.MainLoop() |
|||
|
|||
|
|||
# import wx |
|||
# |
|||
# class MainWindow(wx.Frame): |
|||
# def __init__(self, *args, **kwargs): |
|||
# wx.Frame.__init__(self, *args, **kwargs) |
|||
# |
|||
# self.panel = wx.Panel(self) |
|||
# |
|||
# self.label = wx.StaticText(self.panel, label="Label") |
|||
# self.text = wx.TextCtrl(self.panel) |
|||
# self.button = wx.Button(self.panel, label="Test") |
|||
# |
|||
# self.button1 = wx.Button(self.panel, label="ABOVE") |
|||
# self.button2 = wx.Button(self.panel, label="BELOW") |
|||
# |
|||
# self.horizontal = wx.BoxSizer() |
|||
# self.horizontal.Add(self.label, flag=wx.CENTER) |
|||
# self.horizontal.Add(self.text, proportion=1, flag=wx.CENTER) |
|||
# self.horizontal.Add(self.button, flag=wx.CENTER) |
|||
# |
|||
# self.vertical = wx.BoxSizer(wx.VERTICAL) |
|||
# self.vertical.Add(self.button1, flag=wx.EXPAND) |
|||
# self.vertical.Add(self.horizontal, proportion=1, flag=wx.EXPAND) |
|||
# self.vertical.Add(self.button2, flag=wx.EXPAND) |
|||
# |
|||
# self.panel.SetSizerAndFit(self.vertical) |
|||
# self.Show() |
|||
# |
|||
# |
|||
# app = wx.App(False) |
|||
# win = MainWindow(None) |
|||
# app.MainLoop() |
@ -1 +0,0 @@ |
|||
|
Write
Preview
Loading…
Cancel
Save