# -*- coding: UTF-8 -*-
###############################################################################
# Name:        demo.py
# Purpose:     Demo app for flowsizer
# Author:      Ricardo Pedroso
# Modified by:
# Created:     11 Jun 2005
# RCS-ID:      $Id: demo.py,v 1.3 2005/11/26 16:58:02 rpedroso Exp $
# Copyright:   (c) Ricardo Pedroso
# Licence:     wxWindows licence
###############################################################################

import wx
from flowsizer import FlowSizer

if __name__ == '__main__':
    text ='''\
wxPython is a GUI toolkit for the Python programming language. It allows Python programmers to create programs with a robust, highly functional graphical user interface, simply and easily. It is implemented as a Python extension module (native code) that wraps the popular wxWidgets cross platform GUI library, which is written in C++.
'''

    class Frame(wx.Frame):
        def __init__(self):
            wx.Frame.__init__(self, None, -1)
            panel = wx.Panel(self, -1)
            flow = FlowSizer()
    
            words = text.split()
            for word in words:
                st = wx.StaticText(panel, -1,word)
                flow.Add(st,0,wx.ALL,2)
    
            panel.SetSizer(flow)
            self.Layout()


    app = wx.PySimpleApp()
    Frame().Show()
    app.MainLoop()
