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
| panel = wx.Panel(self, -1)
vbox = wx.BoxSizer(wx.VERTICAL)
hbox1 = wx.BoxSizer(wx.HORIZONTAL) # taille / nombre
hbox2 = wx.BoxSizer(wx.HORIZONTAL) # texte
hbox3 = wx.BoxSizer(wx.HORIZONTAL) # afficher / sauvegarder
textSize = wx.StaticText(panel, -1, 'Taille: ')
spinSize = wx.SpinCtrl(panel, -1, '30', min=1)
textNb = wx.StaticText(panel, -1, 'Nombre: ')
spinNb = wx.SpinCtrl(panel, -1, '15', min=1)
hbox1.Add(textSize, 0, wx.ALIGN_CENTRE)
hbox1.Add(spinSize, 0, wx.ALIGN_CENTRE)
hbox1.Add(textNb, 0, wx.ALIGN_CENTRE)
hbox1.Add(spinNb, 0, wx.ALIGN_CENTRE)
vbox.Add(hbox1, 0, wx.ALIGN_CENTRE)
text = wx.TextCtrl(panel, wx.ID_ANY, style=wx.TE_MULTILINE)
hbox2.Add(text, 0, wx.ALIGN_CENTRE)
vbox.Add(hbox2, 0, wx.ALIGN_CENTRE)
btnShow = wx.Button(panel, -1, 'Afficher')
btnSave = wx.Button(panel, -1, 'Sauvegarder')
hbox3.Add(btnShow, 0, wx.ALIGN_CENTRE)
hbox3.Add(btnSave, 0, wx.ALIGN_CENTRE)
vbox.Add(hbox3, 0, wx.ALIGN_CENTRE)
panel.SetSizer(vbox) |
Partager