-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdemoPrompt19.b_ChatGPT+Pillow.py
38 lines (29 loc) · 1.13 KB
/
demoPrompt19.b_ChatGPT+Pillow.py
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
import wx
class MyFrame1(wx.Frame):
def __init__(self, *args, **kwds):
# Ensure MyFrame1 inherits from wx.Frame
wx.Frame.__init__(self, *args, **kwds)
# Panel to contain widgets
self.panel = wx.Panel(self)
# Button
self.m_button1 = wx.Button(self.panel, wx.ID_ANY, "Open Image")
# StaticBitmap
self.m_bitmap1 = wx.StaticBitmap(self.panel, wx.ID_ANY, wx.NullBitmap)
# Sizer to organize widgets
self.sizer = wx.BoxSizer(wx.VERTICAL)
self.sizer.Add(self.m_button1, 0, wx.ALL, 5)
self.sizer.Add(self.m_bitmap1, 0, wx.ALL, 5)
# Bind button click event to an empty method for now
self.m_button1.Bind(wx.EVT_BUTTON, self.on_button_click)
# Set sizer for layout
self.panel.SetSizer(self.sizer)
def on_button_click(self, event):
# Handle button click event (to be filled later)
pass
# Instantiate MyFrame1
if __name__ == '__main__':
app = wx.App(0)
frame = MyFrame1(None, wx.ID_ANY, "MyFrame1 Title")
app.SetTopWindow(frame)
frame.Show()
app.MainLoop()