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 40 41 42 43 44 45 46 47 48
|
# -*- coding: utf-8 -*-
import wx
from numpy import *
import matrice
#import equation
class TestFrame(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, -1, 'STRUCTURE',size=(400, 400))
## variables
self.xy = [0,0]
## Création du panneau
panel = wx.Panel(self, -1, size=(400,400))
##
## Création du sizer
self.sizerD = wx.GridBagSizer( hgap=10, vgap=0)
## mise en place du sizer dans la fenêtre
panel.SetSizer(self.sizerD)
self.Fit()
## Création du display
self.display = wx.TextCtrl(panel,-1, value=" ",style = wx.TE_MULTILINE,size = (100,60))
self.sizerD.Add(self.display,pos=(1,0),span=(6,1), flag = wx.EXPAND)
## Création de la Listbox
self.sampleList = []
self.listBox = wx.ListBox(panel, -1, (20, 20), (80, 120), self.sampleList, wx.LB_SINGLE)
self.listBox_barre1 = wx.ListBox(panel, -1, (20, 20), (80, 120), self.sampleList, wx.LB_SINGLE)
self.listBox_barre2 = wx.ListBox(panel, -1, (20, 20), (80, 120), self.sampleList, wx.LB_SINGLE)
self.sizerD.Add(self.listBox,pos=(5,1),span=(1,1),flag = wx.EXPAND)
## Gestion du redimensionnement
self.sizerD.AddGrowableCol(0)
self.sizerD.AddGrowableRow(5)
app = wx.PySimpleApp()
TestFrame().Show()
app.MainLoop() |
Partager