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 39
|
#!/usr/bin/env python
# -*- coding: latin-1 -*-
import wx
class MyFrame(wx.Frame):
def __init__(self, parent, id, title):
wx.Frame.__init__(self, parent, id, title, wx.DefaultPosition)
self.SetIcon(wx.Icon('note.ico', wx.BITMAP_TYPE_ICO))
splitter = wx.SplitterWindow(self, -1)
panneau1 = wx.Panel(splitter, -1)
panneau1.SetBackgroundColour(wx.LIGHT_GREY)
vbox2 = wx.BoxSizer(wx.VERTICAL)
panneau2 = wx.Panel(splitter, -1,size=(-1,-1))
self.lc = wx.ListCtrl(panneau2, -1, style=wx.LC_REPORT, size=(-1,-1))
self.lc.InsertColumn(0, 'Radio')
self.lc.InsertColumn(1, 'Genre')
self.lc.InsertColumn(2, 'Note')
vbox2.Add(self.lc, 1, wx.EXPAND | wx.ALL, 3)
panneau2.SetSizer(vbox2)
splitter.SplitVertically(panneau1, panneau2)
class MyApp(wx.App):
def OnInit(self):
frame = MyFrame(None, -1, "Lecteur Radio")
frame.Show(True)
self.SetTopWindow(frame)
return True
app = MyApp(0)
app.MainLoop() |
Partager