-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp-v14-status_bar.py
More file actions
36 lines (25 loc) · 842 Bytes
/
app-v14-status_bar.py
File metadata and controls
36 lines (25 loc) · 842 Bytes
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
"""
Status Bar
"""
import wx
class MyFrame(wx.Frame):
def __init__(self, parent, title):
super(MyFrame, self).__init__(parent, title=title, size=(600, 500))
self.SetMinSize(wx.Size(500, 400)) # ajusta tamanho minimo da janela
statusBar = self.CreateStatusBar(style=wx.BORDER_NONE)
statusBar.SetStatusStyles([wx.SB_FLAT])
statusBar.SetBackgroundColour('green')
statusBar.SetStatusText('This is a Status Bar')
panel = MyPanel(self)
class MyPanel(wx.Panel):
def __init__(self, parent):
super(MyPanel, self).__init__(parent)
class MyApp(wx.App):
def OnInit(self):
title = 'Status Bar'
self.frame = MyFrame(parent=None, title=title)
self.frame.Show()
return True
if __name__ == '__main__':
app = MyApp()
app.MainLoop()