Problem with text alignment

alejandro aleksandar27 at brisiovonet.hr
Wed Mar 4 09:15:49 CET 2009


Here is the whole dialog:

class OpcijeFolija(wx.Dialog):
    def __init__(self, parent, id, title):
        wx.Dialog.__init__(self,parent, id, title, size=(300,300))
        foli=cPickle.load(file("folije.data"))
        #-------------------------- dropdown
        self.combo = wx.ComboBox(self, 10, pos=(20,20), size=(150,-1),
choices=foli,style=wx.CB_READONLY)
        self.Bind(wx.EVT_COMBOBOX, self.OnSelect, id=10)

        #--------------------------text
        wx.StaticText(self,-1,'Sirina role',(20,50))
        wx.StaticText(self,-1,'Naziv folije',(20,80))
        wx.StaticText(self,-1,'Cijena po duznom metru',(20,110))
        #--------------------------text izmjenjivi
        self.sirina =
wx.StaticText(self,-1,'',(200,50),style=wx.ALIGN_RIGHT)
        self.ime = wx.StaticText(self,-1,'',(200,80),style=wx.ALIGN_RIGHT)
        self.cina = wx.StaticText(self,-1,'',(200,110),style=wx.ALIGN_RIGHT)

        self.Centre()

        #-------------------------- botuni
        wx.Button(self,1,'Novi unos',(20,200), size=(80,20))
        wx.Button(self, 2,'Izbrisi',(110,200), size=(80,20))
        wx.Button(self, 3, 'Zatvori',(200,200),size=(80,20))
        self.Bind(wx.EVT_BUTTON, self.OnClose, id=3)

    def OnClose(self, event):
        self.Close()

    def OnSelect(self, event):
        redBr = self.combo.GetCurrentSelection()
        sirinaFajl = cPickle.load(file("sirina.data"))
        imeFajl = cPickle.load(file("folije.data"))
        cijenaDuzinaFajl = cPickle.load(file("duzina.data"))

        self.sirina.SetLabel(str(sirinaFajl[redBr]))
        self.ime.SetLabel(str(imeFajl[redBr]))
        self.cina.SetLabel(str(cijenaDuzinaFajl[redBr]))






More information about the Python-list mailing list