diff --git a/wxPython/demo/wxComboBox.py b/wxPython/demo/wxComboBox.py index 37e52cbb37..13e8fced0d 100644 --- a/wxPython/demo/wxComboBox.py +++ b/wxPython/demo/wxComboBox.py @@ -15,6 +15,7 @@ class TestComboBox(wxPanel): wxPanel.__init__(self, parent, -1) sampleList = ['zero', 'one', 'two', 'three', 'four', 'five', + ##'this is a long item that needs a scrollbar...', 'six', 'seven', 'eight'] wxStaticText(self, -1, "This example uses the wxComboBox control.", @@ -23,6 +24,11 @@ class TestComboBox(wxPanel): wxStaticText(self, -1, "Select one:", wxPoint(15, 50), wxSize(75, 18)) cb = wxComboBox(self, 500, "default value", wxPoint(90, 50), wxSize(95, -1), sampleList, wxCB_DROPDOWN)#|wxTE_PROCESS_ENTER) + ##import win32api, win32con + ##win32api.SendMessage(cb.GetHandle(), + ## win32con.CB_SETHORIZONTALEXTENT, + ## 200, 0) + EVT_COMBOBOX(self, 500, self.EvtComboBox) EVT_TEXT(self, 500, self.EvtText) EVT_TEXT_ENTER(self, 500, self.EvtTextEnter) diff --git a/wxPython/demo/wxFileDialog.py b/wxPython/demo/wxFileDialog.py index 22856eb172..a87dc17194 100644 --- a/wxPython/demo/wxFileDialog.py +++ b/wxPython/demo/wxFileDialog.py @@ -1,5 +1,6 @@ from wxPython.wx import * +import os #--------------------------------------------------------------------------- @@ -8,12 +9,18 @@ wildcard = "Python source (*.py)|*.py|" \ "All files (*.*)|*.*" def runTest(frame, nb, log): - dlg = wxFileDialog(frame, "Choose a file", "", "", wildcard, wxOPEN|wxMULTIPLE) + log.WriteText("CWD: %s\n" % os.getcwd()) + dlg = wxFileDialog(frame, "Choose a file", os.getcwd(), "", wildcard, + wxOPEN + | wxMULTIPLE + #| wxCHANGE_DIR + ) if dlg.ShowModal() == wxID_OK: paths = dlg.GetPaths() log.WriteText('You selected %d files:' % len(paths)) for path in paths: log.WriteText(' %s\n' % path) + log.WriteText("CWD: %s\n" % os.getcwd()) dlg.Destroy() #--------------------------------------------------------------------------- @@ -24,21 +31,12 @@ def runTest(frame, nb, log): - - - - - - - overview = """\ -This class represents the file chooser dialog. +This class provides the file chooser dialog. """ - - if __name__ == '__main__': import sys,os import run diff --git a/wxPython/demo/wxPrintDialog.py b/wxPython/demo/wxPrintDialog.py index 2de009cc54..a0d3477134 100644 --- a/wxPython/demo/wxPrintDialog.py +++ b/wxPython/demo/wxPrintDialog.py @@ -8,9 +8,12 @@ def runTest(frame, nb, log): data.EnablePrintToFile(True) data.EnablePageNumbers(True) data.EnableSelection(True) + data.SetMinPage(1) + data.SetMaxPage(5) dlg = wxPrintDialog(frame, data) if dlg.ShowModal() == wxID_OK: - log.WriteText('\n') + data = dlg.GetPrintDialogData() + log.WriteText('GetAllPages: %d\n' % data.GetAllPages()) dlg.Destroy() #---------------------------------------------------------------------------