[wxPython] wx.StaticText를 이용한 문자열 출력

# -*- coding: cp949 -*-

# statictext.py

import wx

class MyFrame(wx.Frame):
    def __init__(self, parent, id, title):
        wx.Frame.__init__(self, parent, id, title, wx.DefaultPosition, wx.Size(320, 350))

        lyrics1 = '''I'm giving up the ghost of love
                    in the shadows cast on devotion
                    She is the one that I adore
                    creed of my silent suffocation
                    Break this bittersweet spell on me
                    lost in the arms of destiny'''

        lyrics2 = '''There is something in the way
                    You're always somewhere else
                    Feelings have deserted me
                    To a point of no return
                    I don't believe in God
                    But I pray for you'''

        panel = wx.Panel(self, -1)
        # StaticText를 이용한 문자열 출력
        wx.StaticText(panel, -1, lyrics1, (45, 25), style=wx.ALIGN_CENTRE)
        wx.StaticText(panel, -1, lyrics2, (45, 190), style=wx.ALIGN_CENTRE)

class MyApp(wx.App):
    def OnInit(self):
        frame = MyFrame(None, -1, 'statictext.py')
        return True

app = MyApp(0)

[실행 화면]

by 하린아빠 | 2008/02/27 20:18 | wxPython | 트랙백(1) | 덧글(0)
트랙백 주소 : http://pythondev.egloos.com/tb/107269
☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]
Tracked from at 2014/03/11 00:42

제목 : http://helenmccrory.org/

:         :


비공개 덧글

< 이전페이지 다음페이지 >