From: Robin Dunn Date: Sun, 21 Oct 2001 03:44:47 +0000 (+0000) Subject: Fixed some demos X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/dfef5d5165735ab6c9e1b0bd9c4ece1b6f848f26 Fixed some demos git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12127 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/demo/ColorPanel.py b/wxPython/demo/ColorPanel.py index f90a8b0e73..f7dc76ba0b 100644 --- a/wxPython/demo/ColorPanel.py +++ b/wxPython/demo/ColorPanel.py @@ -6,8 +6,7 @@ from wxPython.wx import * class ColoredPanel(wxWindow): def __init__(self, parent, color): - wxWindow.__init__(self, parent, -1, - wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER) + wxWindow.__init__(self, parent, -1, style = wxSIMPLE_BORDER) #wxRAISED_BORDER) self.SetBackgroundColour(color) #--------------------------------------------------------------------------- diff --git a/wxPython/demo/TablePrint.py b/wxPython/demo/TablePrint.py index c2c5255b5d..7fa8e4eeb3 100644 --- a/wxPython/demo/TablePrint.py +++ b/wxPython/demo/TablePrint.py @@ -40,7 +40,7 @@ class TablePanel(wxPanel): eval(code) def ReadData(self): - test_file = "TestTable.txt" + test_file = "./data/TestTable.txt" file = open(test_file,'r',1) i = 0 diff --git a/wxPython/demo/wxNotebook.py b/wxPython/demo/wxNotebook.py index 00d2f5b9d0..745b40c13c 100644 --- a/wxPython/demo/wxNotebook.py +++ b/wxPython/demo/wxNotebook.py @@ -6,6 +6,8 @@ import GridSimple import wxListCtrl import wxScrolledWindow +import sys + #---------------------------------------------------------------------------- class TestNB(wxNotebook): @@ -85,3 +87,14 @@ This class represents a notebook control, which manages multiple windows with as To use the class, create a wxNotebook object and call AddPage or InsertPage, passing a window to be used as the page. Do not explicitly delete the window for a page that is currently managed by wxNotebook. """ + + +if __name__ == "__main__": + app = wxPySimpleApp() + frame = wxFrame(None, -1, "Test Notebook", size=(600, 400)) + win = TestNB(frame, -1, sys.stdout) + frame.Show(true) + app.MainLoop() + + + diff --git a/wxPython/demo/wxSpinCtrl.py b/wxPython/demo/wxSpinCtrl.py index 7729b88b5d..f373c82aa0 100644 --- a/wxPython/demo/wxSpinCtrl.py +++ b/wxPython/demo/wxSpinCtrl.py @@ -17,6 +17,7 @@ class TestPanel(wxPanel): sc = wxSpinCtrl(self, -1, "", wxPoint(30, 50), wxSize(80, -1)) sc.SetRange(1,100) sc.SetValue(5) + #sc.Enable(false) #----------------------------------------------------------------------