Buenas tardes, tengo otra duda:
Necesito centrar un wx.Statictext (tc1) en la pantalla, pero al tenenr una 
fuente asociada no puedo como lo hago, gracias.
 
import wx
 
class Ventana(wx.Frame):
    def __init__(self):
        wx.Frame.__init__(self, None, -1, 'Static Text Example', size=(800, 300)
                          )
        panel = wx.Panel(self, -1)
        font = wx.Font(16, wx.DECORATIVE, wx.ITALIC, wx.NORMAL)
        tc1 = wx.StaticText(panel, -1, "Texto de prueba", (100, 70), (600, 
-1), wx.ALIGN_CENTER)
        tc1.SetForegroundColour('white')
        tc1.SetBackgroundColour('black')
        tc1.SetFont(font)
        tc2 = wx.StaticText(panel, -1, "Segunda linea", (100, 110), (600, -1), 
wx.ALIGN_CENTER)
        tc2.SetForegroundColour('white')
        tc2.SetBackgroundColour('black')

if __name__ == '__main__':
    app = wx.App()
    frame = Ventana()
    frame.Show()
    app.MainLoop()
_______________________________________________
Python-es mailing list
Python-es@python.org
http://mail.python.org/mailman/listinfo/python-es
FAQ: http://python-es-faq.wikidot.com/

Responder a