Hi,
I am new to python and programming in general.
Are there any good wxPython tutorial online ?
So far I have found only those on the wxPython page, which are simple and
clear, but they are not enough.
Moreover, the documentation is C-related (not python), and I cannot
understand much of it.
However, here is my question :
Looking through some examples I found, I am trying to build a very simple
window, read some text from a file and display it in the window; here is my
code :
···
#------------------------
from wxPython.wx import *
class MyFrame(wxFrame):
def __init__(self, parent, ID, title, text):
wxFrame.__init__(self, parent, ID, title,
wxDefaultPosition, wxSize(400, 300))
fintesto = wxTextCtrl(self, -1)
fintesto.WriteText(text)
class MyApp(wxApp):
def OnInit(self):
file=open ( 'my_text.txt','r')
text=file.read()
file.close()
frame = MyFrame(NULL, -1,'', text)
frame.Show(true)
self.SetTopWindow(frame)
return true
app = MyApp(0)
app.MainLoop()
#----------------------
I would like to :
- Add a vertical scroll bar
- Wrap the text in the screen
- Avoid printing 'tab' characters etc.
Any help ?
Thanks in advance,
Fabrizio C.
_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users