X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ec3e670f9f9942d5de4c543edfbc87fc3e0cd797..2d0294308d8d021360c84b92535b8dbc15fb0d66:/utils/wxPython/demo/Main.py diff --git a/utils/wxPython/demo/Main.py b/utils/wxPython/demo/Main.py index 175b0c4e15..2ff415103e 100644 --- a/utils/wxPython/demo/Main.py +++ b/utils/wxPython/demo/Main.py @@ -133,7 +133,7 @@ class wxPythonDemo(wxFrame): self.log = wxTextCtrl(splitter2, -1, style = wxTE_MULTILINE|wxTE_READONLY|wxHSCROLL) (w, self.charHeight) = self.log.GetTextExtent('X') - #self.WriteText('wxPython Demo Log:\n') + self.WriteText('wxPython Demo Log:\n') # add the windows to the splitter and split it. @@ -168,8 +168,9 @@ class wxPythonDemo(wxFrame): w, h = self.log.GetClientSizeTuple() numLines = h/self.charHeight x, y = self.log.PositionToXY(self.log.GetLastPosition()) - self.log.ShowPosition(self.log.XYToPosition(x, y-numLines)) - ##self.log.ShowPosition(self.log.GetLastPosition()) + if y > numLines: + self.log.ShowPosition(self.log.XYToPosition(x, y-numLines)) + ##self.log.ShowPosition(self.log.GetLastPosition()) self.log.SetInsertionPointEnd() def write(self, txt): @@ -265,6 +266,7 @@ class wxPythonDemo(wxFrame): # "of wxPython.\n\n" # " Developed by Robin Dunn", # "About wxPython", wxOK) + from About import MyAboutBox about = MyAboutBox(self) about.ShowModal() about.Destroy() @@ -296,44 +298,6 @@ class wxPythonDemo(wxFrame): -#--------------------------------------------------------------------------- -#--------------------------------------------------------------------------- - -class MyAboutBox(wxDialog): - text = ''' - - -
- - - -

wxPython %s

- -

wxPython is a Python extension module that -encapsulates the wxWindows GUI classes.

- -

This demo shows off some of the capabilities -of wxPython. Select items from the menu or tree control, -sit back and enjoy. Be sure to take a peek at the source code for each -demo item so you can learn how to use the classes yourself.

- -

wxPython is brought to you by Robin Dunn and
-Total Control Software, copyright 1999.

- -

Please see license.txt for licensing information.

-
- - -''' - def __init__(self, parent): - from wxPython.html import * - wxDialog.__init__(self, parent, -1, 'About wxPython') - self.html = wxHtmlWindow(self, -1, wxPoint(5,5), wxSize(400, 350)) - self.html.SetPage(self.text % wx.__version__) - wxButton(self, wxID_OK, 'OK', wxPoint(5, 365)).SetDefault() - self.Fit() - - #--------------------------------------------------------------------------- #---------------------------------------------------------------------------