More demo conversion and cleanup from Jeff

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2004-01-13 03:17:17 +00:00
parent 2b5dcd17c1
commit 95bfd958bd
142 changed files with 282 additions and 1155 deletions

View File

@ -13,11 +13,6 @@ have Acrobat Reader 4.0 installed it won't work.
</body></html>
"""
# 11/24/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for 2.5
#
import sys
import wx

View File

@ -18,11 +18,6 @@ shown.)
</body></html>
"""
# 11/24/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for V2.5
#
import sys
import wx

View File

@ -1,7 +1,3 @@
# 11/4/03 - grimmtooth@softhome.net (Jeff Grimmett)
#
# o wx Namespace
#
import wx
import wx.lib.analogclock as aclock

View File

@ -1,7 +1,3 @@
# 11/15/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import cStringIO
import wx
@ -225,21 +221,21 @@ def runTest(frame, nb, log):
overview = """<html><body>
<h2><center>wxArtProvider</center></h2>
<h2><center>wx.ArtProvider</center></h2>
wxArtProvider class can be used to customize the look of wxWindows
wx.ArtProvider class can be used to customize the look of wxWindows
applications. When wxWindows internal classes need to display an icon
or a bitmap (e.g. in the standard file dialog), it does not use a
hard-coded resource but asks wxArtProvider for it instead. This way
the users can plug in their own wxArtProvider class and easily replace
hard-coded resource but asks wx.ArtProvider for it instead. This way
the users can plug in their own wx.ArtProvider class and easily replace
standard art with his/her own version. It is easy thing to do: all
that is needed is to derive a class from wxArtProvider, override it's
that is needed is to derive a class from wx.ArtProvider, override it's
CreateBitmap method and register the provider with
wxArtProvider_PushProvider.
wx.ArtProvider_PushProvider.
<p>
This class can also be used to get the platform native icons as
provided by wxArtProvider_GetBitmap or wxArtProvider_GetIcon methods.
provided by wx.ArtProvider_GetBitmap or wx.ArtProvider_GetIcon methods.
</body></html>
"""

View File

@ -1,7 +1,3 @@
# 11/15/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx
import images
@ -42,9 +38,15 @@ class TestPanel(wx.Panel):
mask = wx.MaskColour(bmp, wx.BLUE)
bmp.SetMask(mask)
wx.BitmapButton(self, 30, bmp, (160, 20),
b = wx.BitmapButton(self, 30, bmp, (160, 20),
(bmp.GetWidth()+10, bmp.GetHeight()+10))
self.Bind(wx.EVT_BUTTON, self.OnClick, id=30)
b.SetToolTipString("This is a bitmap button.")
self.Bind(wx.EVT_BUTTON, self.OnClick, b)
b = wx.Button(self, 40, "Flat Button", (20,150), style=wx.NO_BORDER)
b.SetToolTipString("This button has a style flag of wx.NO_BORDER")
self.Bind(wx.EVT_BUTTON, self.OnClick, b)
def OnClick(self, event):

View File

@ -1,5 +1,5 @@
#----------------------------------------------------------------------------
# Name: wxCalendar.py
# Name: Calendar.py
# Purpose: Calendar control display testing on panel for wxPython demo
#
# Author: Lorne White (email: lwhite1@planet.eon.net)
@ -11,14 +11,9 @@
# 11/15/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
# o Some updating of the library itself will be needed for this demo to work
# correctly.
#
# 11/26/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Problems have changed a little. The print dialog requires
# a wx.Size to work with the calendar library. wx.core doesn't
# approve, though, so we get deprecation warnings.
# o Ugh. AFter updating to the Bind() method, things lock up
# on various control clicks. Will have to debug. Only seems
# to happen on windows with calendar controls, though.
@ -28,16 +23,6 @@
# o Lockup issue clarification: it appears that the spinner is
# the culprit.
#
# 12/01/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o New Bind() method now fully supported.
#
# 12/17/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o wxCalendar renamed to Calendar
# o Got rid of unneeded IDs where Bind() could figure it
# out for itself.
#
import os
@ -394,7 +379,7 @@ class PrintCalend:
self.font = wx.SWISS
self.bold = wx.NORMAL
self.sel_key = None # last used by
self.sel_key = None # last used by
self.sel_lst = [] # highlighted selected days
self.size = None

View File

@ -1,10 +1,6 @@
# 11/15/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx
import wx.lib.calendar as calendar
import wx.calendar
#----------------------------------------------------------------------
@ -13,20 +9,20 @@ class TestPanel(wx.Panel):
wx.Panel.__init__(self, parent, ID)
self.log = log
cal = calendar.CalendarCtrl(self, -1, wx.DateTime_Now(), pos = (25,50),
style = calendar.CAL_SHOW_HOLIDAYS
| calendar.CAL_SUNDAY_FIRST
| calendar.CAL_SEQUENTIAL_MONTH_SELECTION
cal = wx.calendar.CalendarCtrl(self, -1, wx.DateTime_Now(), pos = (25,50),
style = wx.calendar.CAL_SHOW_HOLIDAYS
| wx.calendar.CAL_SUNDAY_FIRST
| wx.calendar.CAL_SEQUENTIAL_MONTH_SELECTION
)
self.Bind(calendar.EVT_CALENDAR, self.OnCalSelected, id=cal.GetId())
self.Bind(wx.calendar.EVT_CALENDAR, self.OnCalSelected, id=cal.GetId())
b = wx.Button(self, -1, "Destroy the Calendar", pos = (250, 50))
self.Bind(wx.EVT_BUTTON, self.OnButton, id= b.GetId())
self.cal = cal
# Set up control to display a set of holidays:
self.Bind(calendar.EVT_CALENDAR_MONTH, self.OnChangeMonth, id=cal.GetId())
self.Bind(wx.calendar.EVT_CALENDAR_MONTH, self.OnChangeMonth, cal)
self.holidays = [(1,1), (10,31), (12,25) ] # (these don't move around)
self.OnChangeMonth()
@ -55,7 +51,7 @@ def runTest(frame, nb, log):
overview = """\
<html><body>
<h2>wxCalendarCtrl</h2>
<h2>CalendarCtrl</h2>
Yet <i>another</i> calendar control. This one is a wrapper around the C++
version described in the docs. This one will probably be a bit more efficient
@ -64,8 +60,6 @@ so I think both will stay in wxPython.
"""
if __name__ == '__main__':
import sys,os
import run

View File

@ -1,7 +1,3 @@
# 11/15/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx
@ -14,11 +10,10 @@ class TestCheckBox(wx.Panel):
wx.StaticText(self, -1, "This example uses the wxCheckBox control.", (10, 10))
cID = wx.NewId()
cb1 = wx.CheckBox(self, cID, " Apples", (65, 40), (150, 20), wx.NO_BORDER)
cb2 = wx.CheckBox(self, cID+1, " Oranges", (65, 60), (150, 20), wx.NO_BORDER)
cb1 = wx.CheckBox(self, -1, " Apples", (65, 40), (150, 20), wx.NO_BORDER)
cb2 = wx.CheckBox(self, -1, " Oranges", (65, 60), (150, 20), wx.NO_BORDER)
cb2.SetValue(True)
cb3 = wx.CheckBox(self, cID+2, " Pears", (65, 80), (150, 20), wx.NO_BORDER)
cb3 = wx.CheckBox(self, -1, " Pears", (65, 80), (150, 20), wx.NO_BORDER)
self.Bind(wx.EVT_CHECKBOX, self.EvtCheckBox, cb1)
self.Bind(wx.EVT_CHECKBOX, self.EvtCheckBox, cb2)
@ -36,15 +31,13 @@ def runTest(frame, nb, log):
#---------------------------------------------------------------------------
overview = """\
A checkbox is a labelled box which is either on (checkmark is visible) or off (no checkmark).
A checkbox is a labelled box which is either on (checkmark is visible) or off
(no checkmark).
"""
#---------------------------------------------------------------------------
if __name__ == '__main__':
import sys,os

View File

@ -1,8 +1,3 @@
# 11/15/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
# o Why is there a popup menu in this demo?
#
import wx
@ -19,15 +14,15 @@ class TestPanel(wx.Panel):
wx.StaticText(self, -1, "This example uses the wxCheckListBox control.", (45, 15))
lb = wx.CheckListBox(self, 60, (80, 50), (80, 120), sampleList)
self.Bind(wx.EVT_LISTBOX, self.EvtListBox, id=60)
self.Bind(wx.EVT_LISTBOX_DCLICK, self.EvtListBoxDClick, id=60)
lb = wx.CheckListBox(self, -1, (80, 50), (80, 120), sampleList)
self.Bind(wx.EVT_LISTBOX, self.EvtListBox, lb)
self.Bind(wx.EVT_LISTBOX_DCLICK, self.EvtListBoxDClick, lb)
lb.SetSelection(0)
self.lb = lb
pos = lb.GetPosition().x + lb.GetSize().width + 25
btn = wx.Button(self, -1, "Test SetString", (pos, 50))
self.Bind(wx.EVT_BUTTON, self.OnTestButton, id=btn.GetId())
self.Bind(wx.EVT_BUTTON, self.OnTestButton, btn)
self.Bind(wx.EVT_RIGHT_UP, self.OnDoPopup)
def EvtListBox(self, event):

View File

@ -1,7 +1,3 @@
# 11/15/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx
@ -51,8 +47,6 @@ The number of choices and the choice array are consilidated into one python
"""
if __name__ == '__main__':
import sys,os
import run

View File

@ -1,9 +1,7 @@
# 11/4/03 - grimmtooth@softhome.net (Jeff Grimmett)
#
# o Updated for wx namespace
#
# Note: this module is not a demo per se, but is used by many of
# the demo modules for various purposes.
#
import wx

View File

@ -1,16 +1,6 @@
# 11/4/03 - grimmtooth@softhome.net (Jeff Grimmett)
#
# o Updated to use wx namespace
#
# 11/24/03 - grimmtooth@softhome.net (Jeff Grimmett)
#
# o Had to move the call to wx.updateColourDB()
# o Updated several places to change discrete pos and size parameters
# into two-tuples.
#
import wx
import wx.lib.colourdb as cdb
import wx.lib.colourdb
import images
@ -22,7 +12,7 @@ class TestWindow(wx.ScrolledWindow):
wx.ScrolledWindow.__init__(self, parent, -1)
# Populate our color list
self.clrList = cdb.getColourList()
self.clrList = wx.lib.colourdb.getColourList()
# Just for style points, we'll use this as a background image.
#self.clrList.sort()
@ -165,7 +155,7 @@ def runTest(frame, nb, log):
# Note 11/24/03 - jg - I moved this into runTest() because
# there must be a wx.App existing before this function
# can be called - this is a change from 2.4 -> 2.5.
cdb.updateColourDB()
wx.lib.colourdb.updateColourDB()
win = TestPanel(nb)

View File

@ -1,7 +1,3 @@
# 11/15/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx
@ -43,12 +39,12 @@ to suit your needs. In the example, we set the dialog up to show the extended co
data selection pane. Otherwise, only the more compact and less extensive colour
dialog is shown. You may also preset the colour as well as other items.
If the user selects something and selects OK, then the wxColourData instance contains
If the user selects something and selects OK, then the wx.ColourData instance contains
the colour data that the user selected. Before destroying the dialog, retrieve the data.
<b>Do not try to retain the wx.ColourData instance.</b> It will probably not be valid
after the dialog is destroyed.
Along with he wxColourDialog documentation, see also the wx.ColourData documentation
Along with he wx.ColourDialog documentation, see also the wx.ColourData documentation
for details.
"""

View File

@ -15,20 +15,7 @@
# - use sizers
# - other minor "improvements"
#----------------------------------------------------------------------------
# 11/22/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for V2.5
#
# 11/24/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Added Bind() handlers to what events can handle it. However, the
# colourselect library must be converted before its events can be
# bound using the Bind() method.
#
# 12/01/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o colourselect lib converted; demo converted to match.
#
import wx
import wx.lib.colourselect as csel

View File

@ -1,7 +1,3 @@
# 11/15/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx
@ -24,7 +20,7 @@ class TestComboBox(wx.Panel):
#'this is a long item that needs a scrollbar...',
'six', 'seven', 'eight']
wx.StaticText(self, -1, "This example uses the wxComboBox control.", (8, 10))
wx.StaticText(self, -1, "This example uses the wx.ComboBox control.", (8, 10))
wx.StaticText(self, -1, "Select one:", (15, 50), (75, 18))
# This combobox is created with a preset list of values.
@ -33,11 +29,6 @@ class TestComboBox(wx.Panel):
(95, -1), sampleList, wx.CB_DROPDOWN #|wxTE_PROCESS_ENTER
)
##import win32api, win32con
##win32api.SendMessage(cb.GetHandle(),
## win32con.CB_SETHORIZONTALEXTENT,
## 200, 0)
self.Bind(wx.EVT_COMBOBOX, self.EvtComboBox, cb)
self.Bind(wx.EVT_TEXT, self.EvtText, cb)
self.Bind(wx.EVT_TEXT_ENTER, self.EvtTextEnter, cb)
@ -85,7 +76,6 @@ def runTest(frame, nb, log):
#---------------------------------------------------------------------------
overview = """\
A ComboBox is like a combination of an edit control and a listbox. It can be
displayed as static list with editable or read-only text field; or a drop-down
@ -108,6 +98,8 @@ event is generated every time that the user hits a key in the ComboBox entry fie
"""
#---------------------------------------------------------------------------
if __name__ == '__main__':
import sys,os
import run

View File

@ -1,11 +1,3 @@
# 11/4/2003 - grimmtooth@softhome.net (Jeff Grimmett)
#
# o Modified for V2.5
#
# 11/24/2003 - grimmtooth@softhome.net (Jeff Grimmett)
#
# o Removed import of wx.help - now part of wx.core.
#
import wx

View File

@ -1,11 +1,3 @@
# 11/5/2003 - Modified by grimmtooth@softhome.net (Jeff Grimmett)
#
# o Updated for wx namespace
#
# 11/24/2003 - Modified by grimmtooth@softhome.net (Jeff Grimmett)
#
# o Issues around line 167. I'm stuck.
#
import cPickle
import wx

View File

@ -1,7 +1,3 @@
# 11/15/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx
@ -19,7 +15,7 @@ class TestDialog(wx.Dialog):
style=wx.DEFAULT_DIALOG_STYLE
):
# Instead of calling wxDialog.__init__ we precreate the dialog
# Instead of calling wx.Dialog.__init__ we precreate the dialog
# so we can set an extra style that must be set before
# creation, and then we create the GUI dialog using the Create
# method.
@ -36,7 +32,7 @@ class TestDialog(wx.Dialog):
# contents
sizer = wx.BoxSizer(wx.VERTICAL)
label = wx.StaticText(self, -1, "This is a wxDialog")
label = wx.StaticText(self, -1, "This is a wx.Dialog")
label.SetHelpText("This is the help text for the label")
sizer.Add(label, 0, wx.ALIGN_CENTRE|wx.ALL, 5)

View File

@ -10,9 +10,6 @@
# Copyright: (c) 1998 by Total Control Software
# Licence: wxWindows license
#----------------------------------------------------------------------------
# Updated 11/9/2003 by Jeff Grimmett (grimmtooth@softhome.net)
#
# o Converted for V2.5 compatability
#
import wx

View File

@ -1,7 +1,3 @@
# 11/17/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx

View File

@ -1,14 +1,3 @@
# 11/5/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
# o Got rid of all the hardcoded window IDs.
# o Fixed a bug in class TestPanel() (empty sizer Add())
#
# 11/25/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Fixed a bug in the BMP file dialog; was using GetFilename()
# instead of GetPath() to get the file to load.
#
import wx

View File

@ -1,7 +1,3 @@
# 11/15/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx
import images

View File

@ -1,13 +1,3 @@
# 11/5/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
# o Replaced all calls to deprecated whrandom module with up to date random calls.
# See Python docs regarding whrandom for details.
#
# 11/25/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o New binding
#
import random
import time

View File

@ -1,7 +1,3 @@
# 11/17/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx
import wx.gizmos as gizmos

View File

@ -1,8 +1,3 @@
# 11/17/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
# o Added overview text based on source code delving.
#
import wx
import wx.gizmos as gizmos

View File

@ -1,15 +1,3 @@
# 11/17/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 11/28/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o editor lib hasn't been hit by the renamer yet.
#
# 12/21/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o wxEditor -> Editor
#
import wx
import wx.lib.editor as editor

View File

@ -8,16 +8,6 @@
# Copyright: (c) 2002 by Robb Shecter (robb@acm.org)
# Licence: wxWindows license
#---------------------------------------------------------------------------
#
# 11/22/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 11/25/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o What happened to wx.Color()?
#
import wx
import wx.lib.evtmgr as em

View File

@ -1,18 +1,3 @@
# 11/5/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated to wx namespace
#
# 11/25/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Issues previously noted have evaporated.
# o Hoo boy, the doc string in the lib needs fixed :-)
#
# 12/02/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Making the library's doc string acceptable for the overview rendered
# it unusable in the library's own test code, so I copied it over
# and massaged the XML into useful HTML.
#
import wx
import wx.lib.fancytext as fancytext

View File

@ -1,16 +1,3 @@
# 11/7/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
# o Uncommented fbbhCallback in TestPanel.fbbh init. Appears to work fine.
# Wonder why it was commented.
# o Unrelated: TestPanel.dbb appears to cause a program error in the demo. If
# it is commented out, everything works fine. Investigating.
# o Bernhard has responded to query, does not plan on updating demo.
#
# 11/25/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o All issues, including the program error, have gone away in V2.5.
#
""" Demonstrate filebrowsebutton module of the wxPython.lib Library.

View File

@ -1,7 +1,3 @@
# 11/17/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import os
import wx
@ -9,7 +5,7 @@ import wx
#---------------------------------------------------------------------------
# This is how you pre-establish a file filter so that the dialog
# only shows the extention(s) you want it to.
# only shows the extension(s) you want it to.
wildcard = "Python source (*.py)|*.py|" \
"Compiled Python (*.pyc)|*.pyc|" \
"All files (*.*)|*.*"

View File

@ -1,7 +1,3 @@
# 11/17/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import os
import wx
@ -9,7 +5,7 @@ import wx
#---------------------------------------------------------------------------
# This is how you pre-establish a file filter so that the dialog
# only shows the extention(s) you want it to.
# only shows the extension(s) you want it to.
wildcard = "Python source (*.py)|*.py|" \
"Compiled Python (*.pyc)|*.pyc|" \
"SPAM files (*.spam)|*.spam|" \
@ -76,10 +72,10 @@ There are two ways to get the results back from the dialog. GetFiles() returns o
the file names themselves, in a Python list. GetPaths() returns the full path and
filenames combined as a Python list.
One important thing to note: if you use the file extention filters, then files saved
with the filter set to something will automatically get that extention appended to them
One important thing to note: if you use the file extension filters, then files saved
with the filter set to something will automatically get that extension appended to them
if it is not already there. For example, suppose the dialog was displaying the 'egg'
extention and you entered a file name of 'fried'. It would be saved as 'fried.egg.'
extension and you entered a file name of 'fried'. It would be saved as 'fried.egg.'
Yum!
"""

View File

@ -1,7 +1,3 @@
# 11/17/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import os
import wx

View File

@ -63,8 +63,6 @@ class TestPanel(wx.Panel):
et = evt.GetEventType()
#print evt.GetReplaceString()
if et in map:
evtType = map[et]
else:
@ -77,7 +75,7 @@ class TestPanel(wx.Panel):
else:
replaceTxt = ""
self.log.write("%s -- Find text: %s %s Flags: %d \n" %
self.log.write("%s -- Find text: %s Replace text: %s Flags: %d \n" %
(evtType, evt.GetFindString(), replaceTxt, evt.GetFlags()))

View File

@ -1,17 +1,8 @@
# 11/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
# o OK, Main.py indicates this is deprecated. But I don't see a
# replacement yet. So conversion is done anyway.
#
# 11/28/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Issues - library has to be converted to work properly
# with new namespace.
#
# 12/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o wxFloatBar -> FloatBar
# Please note that wx.lib.floatbar is not formally supported as
# part of wxPython. If it works, fine. If not, unfortunate.
# GTK users can use the wx.TB_DOCKABLE flag with a regular
# wx.ToolBar, but everyone else has to take thier chances.
#
import wx

View File

@ -1,7 +1,3 @@
# 11/25/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for V2.5
#
import wx

View File

@ -1,7 +1,3 @@
# 11/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx
@ -16,8 +12,6 @@ class TestPanel(wx.Panel):
self.Bind(wx.EVT_BUTTON, self.OnSelectFont, btn)
self.sampleText = wx.TextCtrl(self, -1, "Sample Text")
#from wxPython.lib.stattext import wxGenStaticText
#self.sampleText = wxGenStaticText(self, -1, "Sample Text")
self.curFont = self.sampleText.GetFont()
self.curClr = wx.BLACK

View File

@ -1,7 +1,3 @@
# 11/25/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for V2.5
#
import wx

View File

@ -1,7 +1,3 @@
# 11/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx
@ -31,7 +27,7 @@ class MyFrame(wx.Frame):
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
win = MyFrame(frame, -1, "This is a wxFrame", size=(350, 200),
win = MyFrame(frame, -1, "This is a wx.Frame", size=(350, 200),
style = wx.DEFAULT_FRAME_STYLE)# | wx.FRAME_TOOL_WINDOW )
frame.otherWin = win
win.Show(True)

View File

@ -29,7 +29,7 @@ except ImportError:
if not haveGLCanvas:
def runTest(frame, nb, log):
dlg = wx.MessageDialog(
frame, 'The wxGLCanvas has not been included with this build of wxPython!',
frame, 'The wx.GLCanvas has not been included with this build of wxPython!',
'Sorry', wx.OK | wx.ICON_INFORMATION
)
@ -69,7 +69,7 @@ else:
box.Add(btn, 0, wx.ALIGN_CENTER|wx.ALL, 15)
self.Bind(wx.EVT_BUTTON, self.OnButton, id=k)
#** Enable this to show putting a wxGLCanvas on the wxPanel
#** Enable this to show putting a wx.GLCanvas on the wxPanel
if 0:
c = CubeCanvas(self)
c.SetSize((200, 200))

View File

@ -1,7 +1,3 @@
# 11/15/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx
@ -13,7 +9,7 @@ class TestPanel(wx.Panel):
self.log = log
self.count = 0
wx.StaticText(self, -1, "This example shows the wxGauge control.", (45, 15))
wx.StaticText(self, -1, "This example shows the wx.Gauge control.", (45, 15))
self.g1 = wx.Gauge(self, -1, 50, (110, 50), (250, 25))
self.g1.SetBezelFace(3)

View File

@ -1,7 +1,3 @@
# 11/6/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx
import wx.lib.buttons as buttons
@ -20,30 +16,30 @@ class TestPanel(wx.Panel):
# A regular button, selected as the default button
b = wx.Button(self, -1, "A real button")
b.SetDefault()
self.Bind(wx.EVT_BUTTON, self.OnButton, id=b.GetId())
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
sizer.Add(b)
# Same thing, but NOT set as the default button
b = wx.Button(self, -1, "non-default")
self.Bind(wx.EVT_BUTTON, self.OnButton, id=b.GetId())
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
sizer.Add(b)
sizer.Add((10,10))
# Plain old text button based off GenButton()
b = buttons.GenButton(self, -1, 'Hello')
self.Bind(wx.EVT_BUTTON, self.OnButton, id=b.GetId())
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
sizer.Add(b)
# Plain old text button, disabled.
b = buttons.GenButton(self, -1, 'disabled')
self.Bind(wx.EVT_BUTTON, self.OnButton, id=b.GetId())
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
b.Enable(False)
sizer.Add(b)
# This time, we let the botton be as big as it can be.
# Also, this one is fancier, with custom colors and bezel size.
b = buttons.GenButton(self, -1, 'bigger')
self.Bind(wx.EVT_BUTTON, self.OnBiggerButton, id=b.GetId())
self.Bind(wx.EVT_BUTTON, self.OnBiggerButton, b)
b.SetFont(wx.Font(20, wx.SWISS, wx.NORMAL, wx.BOLD, False))
b.SetBezelWidth(5)
###b.SetBestSize()
@ -56,20 +52,20 @@ class TestPanel(wx.Panel):
# An image button
bmp = images.getTest2Bitmap()
b = buttons.GenBitmapButton(self, -1, bmp)
self.Bind(wx.EVT_BUTTON, self.OnButton, id=b.GetId())
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
sizer.Add(b)
# An image button, disabled.
bmp = images.getTest2Bitmap()
b = buttons.GenBitmapButton(self, -1, bmp)
self.Bind(wx.EVT_BUTTON, self.OnButton, id=b.GetId())
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
sizer.Add(b)
b.Enable(False)
# An image button, using a mask to get rid of the
# undesireable part of the image
b = buttons.GenBitmapButton(self, -1, None)
self.Bind(wx.EVT_BUTTON, self.OnButton, id=b.GetId())
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
bmp = images.getBulb1Bitmap()
mask = wx.MaskColour(bmp, wx.BLUE)
bmp.SetMask(mask)
@ -83,12 +79,12 @@ class TestPanel(wx.Panel):
# A toggle button
b = buttons.GenToggleButton(self, -1, "Toggle Button")
self.Bind(wx.EVT_BUTTON, self.OnToggleButton, id=b.GetId())
self.Bind(wx.EVT_BUTTON, self.OnToggleButton, b)
sizer.Add(b)
# An image toggle button
b = buttons.GenBitmapToggleButton(self, -1, None)
self.Bind(wx.EVT_BUTTON, self.OnToggleButton, id=b.GetId())
self.Bind(wx.EVT_BUTTON, self.OnToggleButton, b)
bmp = images.getBulb1Bitmap()
mask = wx.MaskColour(bmp, wx.BLUE)
bmp.SetMask(mask)
@ -103,7 +99,7 @@ class TestPanel(wx.Panel):
# A bitmap button with text.
b = buttons.GenBitmapTextButton(self, -1, None, "Bitmapped Text", size = (200, 45))
self.Bind(wx.EVT_BUTTON, self.OnButton, id=b.GetId())
self.Bind(wx.EVT_BUTTON, self.OnButton, b)
bmp = images.getBulb1Bitmap()
mask = wx.MaskColour(bmp, wx.BLUE)
bmp.SetMask(mask)

View File

@ -1,7 +1,3 @@
# 11/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx

View File

@ -1,20 +1,16 @@
# 11/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx
#---------------------------------------------------------------------------
buttonDefs = {
814 : ('GridSimple', ' Simple wxGrid, catching all events '),
815 : ('GridStdEdRend', ' wxGrid showing Editors and Renderers '),
818 : ('GridHugeTable', ' A wxGrid with a HUGE table (100 MILLION cells!) '),
817 : ('GridCustTable', ' wxGrid using a custom Table, with non-string data '),
814 : ('GridSimple', ' Simple wx.Grid, catching all events '),
815 : ('GridStdEdRend', ' wx.Grid showing Editors and Renderers '),
818 : ('GridHugeTable', ' A wx.Grid with a HUGE table (100 MILLION cells!) '),
817 : ('GridCustTable', ' wx.Grid using a custom Table, with non-string data '),
819 : ('GridEnterHandler',' Remapping keys to behave differently '),
820 : ('GridCustEditor', ' Shows how to create a custom Cell Editor '),
821 : ('GridDragable', ' A wxGrid with dragable rows and columns '),
821 : ('GridDragable', ' A wx.Grid with dragable rows and columns '),
822 : ('GridDragAndDrop', ' Shows how to make a grid a drop target for files'),
}
@ -58,12 +54,12 @@ def runTest(frame, nb, log):
overview = """\
<html><body>
<h2>wxGrid</h2>
<h2>wx.Grid</h2>
This demo shows various ways of using the <b><i>new and
improved</i></b> wxGrid class. Unfortunatly it has not been
improved</i></b> wx.Grid class. Unfortunatly it has not been
documented yet, and while it is somewhat backwards compatible, if you
try to go by the current wxGrid documentation you will probably just
try to go by the current wx.Grid documentation you will probably just
confuse yourself.
<p>
You can look at the sources for these samples to learn a lot about how

View File

@ -3,7 +3,7 @@ import wx # This module uses the new wx namespace
#----------------------------------------------------------------------
gbsDescription = """\
The wxGridBagSizer is similar to the wxFlexGridSizer except the items are explicitly positioned
The wx.GridBagSizer is similar to the wx.FlexGridSizer except the items are explicitly positioned
in a virtual cell of the layout grid, and column or row spanning is allowed. For example, this
static text is positioned at (0,0) and it spans 7 columns.
"""
@ -11,7 +11,7 @@ static text is positioned at (0,0) and it spans 7 columns.
class TestFrame(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, -1, "wxGridBagSizer")
wx.Frame.__init__(self, None, -1, "wx.GridBagSizer")
p = wx.Panel(self, -1)
p.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)
@ -93,7 +93,7 @@ class TestFrame(wx.Frame):
else:
if self.gbs.CheckForIntersection( (3,6), (1,1) ):
wx.MessageBox("""\
wxGridBagSizer will not allow items to be in the same cell as
wx.GridBagSizer will not allow items to be in the same cell as
another item, so this operation will fail. You will also get an assert
when compiled in debug mode.""",
"Warning", wx.OK | wx.ICON_INFORMATION)
@ -130,9 +130,9 @@ def runTest(frame, nb, log):
overview = """<html><body>
<h2><center>wxGridBagSizer</center></h2>
<h2><center>wx.GridBagSizer</center></h2>
The wxGridBagSizer is more or less a port of the the RowColSizer (that
The wx.GridBagSizer is more or less a port of the the RowColSizer (that
has been in the wxPython.lib package for quite some time) to C++. It
allows items to be placed at specific layout grid cells, and items can
span across more than one row or column.

View File

@ -1,7 +1,3 @@
# 11/6/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# Modified for wx namespace
#
import string
@ -18,7 +14,7 @@ class MyCellEditor(gridlib.PyGridCellEditor):
Notice that in order to call the base class version of these special
methods we use the method name preceded by "base_". This is because these
methods are "virtual" in C++ so if we try to call wxGridCellEditor.Create
methods are "virtual" in C++ so if we try to call wx.GridCellEditor.Create
for example, then when the wxPython extension module tries to call
ptr->Create(...) then it actually calls the derived class version which
looks up the method in this class and calls it, causing a recursion loop.

View File

@ -1,9 +1,3 @@
# 11/6/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
# o Also corrected minor bug where 'true' was being used instead of 'True'.
# Doesn't fail for * import (I guess that is still defined in wx), but does
# in the manner we're importing wx now.
import wx
import wx.grid as gridlib

View File

@ -1,7 +1,3 @@
# 11/6/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
"""
Example showing how to make a grid a drop target for files.

View File

@ -1,13 +1,3 @@
# 11/6/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Modified for V2.5
#
# 11/25/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o wx renamer didn't appear to 'catch' all the classes in
# wx.lib.gridmovers
# o Event binder not working properly with wx.lib.gridmovers
#
import wx
import wx.grid as gridlib

View File

@ -1,7 +1,3 @@
# 11/6/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx
import wx.grid as gridlib

View File

@ -1,7 +1,3 @@
# 11/6/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx
import wx.grid as gridlib

View File

@ -1,14 +1,3 @@
# 11/6/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for V2.5
# o The mixin features were all commented out. Is it broke? Should it even
# be in the source? Or is it left as an exercise to the reader?
#
# 11/25/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Robin confirms, this is tutorial code. But be warned! It has not been
# converted OR tested!
#
import wx
import wx.grid as gridlib

View File

@ -1,8 +1,3 @@
# 11/25/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for V2.5
# o There is one wx.Size() I haven't figured out how to get rid of yet.
#
import random

View File

@ -1,7 +1,3 @@
# 11/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx
import wx.grid as Grid
@ -10,7 +6,7 @@ import images
class MegaTable(Grid.PyGridTableBase):
"""
A custom wxGrid Table using user supplied data
A custom wx.Grid Table using user supplied data
"""
def __init__(self, data, colnames, plugins):
"""data is a list of the form
@ -90,7 +86,7 @@ class MegaTable(Grid.PyGridTableBase):
def _updateColAttrs(self, grid):
"""
wxGrid -> update the column attributes to add the
wx.Grid -> update the column attributes to add the
appropriate renderer given the column name. (renderers
are stored in the self.plugins dictionary)
@ -187,7 +183,7 @@ class MegaTable(Grid.PyGridTableBase):
# --------------------------------------------------------------------
# Sample wxGrid renderers
# Sample wx.Grid renderers
class MegaImageRenderer(Grid.PyGridCellRenderer):
def __init__(self, table):

View File

@ -1,15 +1,3 @@
# 11/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 12/13/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o got the wxpTag stuff working right.
#
# 12/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o wxScrolledMessageDialog -> ScrolledMessageDialog
#
import os
import sys
@ -211,9 +199,9 @@ def runTest(frame, nb, log):
overview = """<html><body>
<h2>wxHtmlWindow</h2>
<h2>wx.HtmlWindow</h2>
<p>wxHtmlWindow is capable of parsing and rendering most
<p>wx.HtmlWindow is capable of parsing and rendering most
simple HTML tags.
<p>It is not intended to be a high-end HTML browser. If you're

View File

@ -196,9 +196,9 @@ def runTest(frame, nb, log):
overview = """\
<html><body>
<h2>wxIEHtmlWin</h2>
<h2>wx.IEHtmlWin</h2>
The wxIEHtmlWin class is the first example of using a contributed
The wx.IEHtmlWin class is the first example of using a contributed
wxActiveX class in wxWindows C++. It is still experimental, but
I think it is useful.

View File

@ -1,7 +1,3 @@
# 11/19/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx

View File

@ -8,16 +8,6 @@
# Date: Feb 26, 2001
# Licence: wxWindows license
#----------------------------------------------------------------------------
#
# 11/23/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 11/25/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Library has to be updated, it is using obsolete names
# (wxPyDefaultSize, etc)
#
import os

View File

@ -1,7 +1,3 @@
# 11/19/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import cStringIO

View File

@ -1,20 +1,3 @@
# 11/19/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 11/29/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o intctrl needs the renamer applied.
# o intctrl needs new event binders.
#
# 12/08/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o All issues corrected
#
# 12/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o wxIntCtrl -> IntCtrl
#
import wx
import wx.lib.intctrl

View File

@ -1,15 +1,3 @@
# 11/19/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 11/29/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o lib.mixins.listctrl needs wx renamer applied.
#
# 12/21/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o wxListCtrlAutoWidthMixin -> ListCtrlAutoWidthMixin
#
import wx
import wx.lib.mixins.listctrl as listmix

View File

@ -1,7 +1,3 @@
# 11/19/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import time
@ -55,7 +51,7 @@ overview = """\
source, which was a bit reluctant to reveal its secrets. My appologies if
I missed anything - jmg</font>
<p>
<code><b>wxLEDNumberCtrl</b>( parent, id=-1, pos=wx.DefaultPosition,
<code><b>LEDNumberCtrl</b>( parent, id=-1, pos=wx.DefaultPosition,
size=wx.DefaultSize, style=LED_ALIGN_LEFT | LED_DRAW_FADED)</code>
<p>This is a control that simulates an LED clock display. It only accepts

View File

@ -1,9 +1,3 @@
# 11/6/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
# o In the lambda function at the top, removed the leading 'wx' from the
# ID names to remove confusion with 'official' wx members.
#
import wx
import wx.lib.anchors as anchors

View File

@ -1,7 +1,3 @@
# 11/19/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx

View File

@ -1,24 +1,15 @@
# 11/12/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
# o Controls now use dynamic IDs instead of hardcoded IDs.
#
import wx
import wx.lib.layoutf as layoutf
#---------------------------------------------------------------------------
ID_Button = wx.NewId()
#---------------------------------------------------------------------------
class TestLayoutf(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent, -1)
self.SetAutoLayout(True)
self.Bind(wx.EVT_BUTTON, self.OnButton, id=ID_Button)
self.Bind(wx.EVT_BUTTON, self.OnButton)
self.panelA = wx.Window(self, -1, style=wx.SIMPLE_BORDER)
self.panelA.SetBackgroundColour(wx.BLUE)
@ -38,10 +29,10 @@ class TestLayoutf(wx.Panel):
layoutf.Layoutf('t_10#3;r=r10#1;b=b10#1;l>10#2', (self,self.panelA,self.panelB))
)
b = wx.Button(self.panelA, ID_Button, ' Panel A ')
b = wx.Button(self.panelA, -1, ' Panel A ')
b.SetConstraints(layoutf.Layoutf('X=X#1;Y=Y#1;h*;w%w50#1', (self.panelA,)))
b = wx.Button(self.panelB, ID_Button, ' Panel B ')
b = wx.Button(self.panelB, -1, ' Panel B ')
b.SetConstraints(layoutf.Layoutf('t=t2#1;r=r4#1;h*;w*', (self.panelB,)))
self.panelD = wx.Window(self.panelC, -1, style=wx.SIMPLE_BORDER)
@ -50,7 +41,7 @@ class TestLayoutf(wx.Panel):
layoutf.Layoutf('b%h50#1;r%w50#1;h=h#2;w=w#2', (self.panelC, b))
)
b = wx.Button(self.panelC, ID_Button, ' Panel C ')
b = wx.Button(self.panelC, -1, ' Panel C ')
b.SetConstraints(layoutf.Layoutf('t_#1;l>#1;h*;w*', (self.panelD,)))
wx.StaticText(self.panelD, -1, "Panel D", (4, 4)).SetBackgroundColour(wx.GREEN)

View File

@ -1,7 +1,3 @@
# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx
@ -78,7 +74,7 @@ class TestListBox(wx.Panel):
'six', 'seven', 'eight', 'nine', 'ten', 'eleven',
'twelve', 'thirteen', 'fourteen']
wx.StaticText(self, -1, "This example uses the wxListBox control.", (45, 10))
wx.StaticText(self, -1, "This example uses the wx.ListBox control.", (45, 10))
wx.StaticText(self, -1, "Select one:", (15, 50), (65, 18))
self.lb1 = wx.ListBox(self, 60, (80, 50), (80, 120), sampleList, wx.LB_SINGLE)
self.Bind(wx.EVT_LISTBOX, self.EvtListBox, self.lb1)

View File

@ -9,26 +9,6 @@
# Copyright: (c) 1998 by Total Control Software
# Licence: wxWindows license
#----------------------------------------------------------------------------
#
# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 11/29/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o listctrl mixin needs wx renamer.
# o wx.ListItem.GetText() returns a wxString pointer, not the text.
#
# 12/14/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o ColumnSorterMixin implementation was broke - added event.Skip()
# to column click event to allow event to fall through to mixin.
#
# 12/21/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o wxColumnSorterMixin -> ColumnSorterMixin
# o wxListCtrlAutoWidthMixin -> ListCtrlAutoWidthMixin
#
import wx
import wx.lib.mixins.listctrl as listmix

View File

@ -1,11 +1,3 @@
# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 11/29/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o wx.ListItem.GetText() returns a wxString pointer, not the text.
#
import wx
import images

View File

@ -1,19 +1,10 @@
# 11/22/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 11/29/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Bunches of imports that might need to go away for the final roll-out.
#
import sys
import wx
import images
import ColorPanel
import images
colourList = [ "Aquamarine", "Black", "Blue", "Blue Violet", "Brown", "Cadet Blue",
"Coral", "Cornflower Blue", "Cyan", "Dark Grey", "Dark Green",
@ -112,10 +103,10 @@ def runTest(frame, nb, log):
overview = """\
<html><body>
<h2>wxListbook</h2>
<h2>wx.Listbook</h2>
<p>
This class is a control similar to a notebook control, but with a
wxListCtrl instead of a set of tabs.
wx.ListCtrl instead of a set of tabs.
"""

View File

@ -1,10 +1,3 @@
#!/usr/bin/env python
# 11/12/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
# o Replaced hardcoded menu IDs with dynamic IDs
#
import wx

View File

@ -1,10 +1,5 @@
#!/usr/bin/env python
# 11/6/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx
import ScrolledWindow

View File

@ -1,7 +1,3 @@
# 11/12/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx

View File

@ -1,15 +1,3 @@
# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 11/30/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Library must be updated for this to run.
#
# 12/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o wxMVCTree -> MVCTree
#
import os
import sys

View File

@ -1,7 +1,3 @@
# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx

View File

@ -1,25 +1,3 @@
# 11/23/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 11/26/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o the three libraries below all have not been hit by the
# wx renamer.
#
# 12/09/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o A few changes to correct my own mistakes earlier :-).
#
# 12/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o wxMaskedTextCtrl -> MaskedTextCtrl
# o wxMaskedComboBox -> MaskedComboBox
# o wxIpAddrCtrl -> IpAddrCtrl
# o wxMaskedNumCtrl -> MaskedNumCtrl
# o wxTimeCtrl -> TimeCtrl
# o wxScrolledPanel -> ScrolledPanel
#
import string
import sys

View File

@ -1,19 +1,3 @@
# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 11/29/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o wx.lib.maskednumctrl needs hit up with the renamer and new binders
#
# 12/09/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Issues with lib corrected.
#
# 12/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o wxMaskedNumCtrl -> MaskedNumCtrl
#
import string
import sys

View File

@ -4,10 +4,12 @@
# menus in wxPython 2.3.3
#
#-------------------------------------------------------------------
# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# o Debug message when adding a menu item (see last menu):
#
# Debug: ..\..\src\msw\menuitem.cpp(370): 'GetMenuState' failed with
# error 0x00000002 (the system cannot find the file specified.).
#
import time
import wx
@ -139,7 +141,6 @@ check the source for this sample to see how to implement them.
text = item.GetText()
help = item.GetHelp()
#print text, help
# but in this case just call Skip so the default is done
event.Skip()
@ -263,7 +264,7 @@ def runTest(frame, nb, log):
overview = """\
A demo of using wxMenuBar and wxMenu in various ways.
A demo of using wx.MenuBar and wx.Menu in various ways.
A menu is a popup (or pull down) list of items, one of which may be selected
before the menu goes away (clicking elsewhere dismisses the menu). Menus may be
@ -278,7 +279,7 @@ Menu items may be either normal items, check items or radio items. Normal items
don't have any special properties while the check items have a boolean flag associated
to them and they show a checkmark in the menu when the flag is set. wxWindows
automatically toggles the flag value when the item is clicked and its value may
be retrieved using either IsChecked method of wxMenu or wxMenuBar itself or by
be retrieved using either IsChecked method of wx.Menu or wx.MenuBar itself or by
using wxEvent.IsChecked when you get the menu notification for the item in question.
The radio items are similar to the check items except that all the other items

View File

@ -1,7 +1,3 @@
# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx
@ -27,7 +23,7 @@ and, if so, what kind.
The dialog can be modal or not; of modal, the user's response is in the return
code of ShowModal(). If not, the response can be taken from GetReturnCode() (inherited
from the wxDialog super class). If not modal and the return code is required, it
from the wx.Dialog). If not modal and the return code is required, it
must be retrieved before the dialog is destroyed.
"""

View File

@ -1,7 +1,3 @@
# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx
@ -30,7 +26,7 @@ class MyMiniFrame(wx.MiniFrame):
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
win = MyMiniFrame(frame, "This is a wxMiniFrame",
win = MyMiniFrame(frame, "This is a wx.MiniFrame",
#pos=(250,250), size=(200,200),
style=wx.DEFAULT_FRAME_STYLE | wx.TINY_CAPTION_HORIZ)
win.SetSize((200, 200))
@ -43,9 +39,9 @@ def runTest(frame, nb, log):
overview = """\
A miniframe is a frame with a small title bar. It is suitable for floating
A MiniFrame is a Frame with a small title bar. It is suitable for floating
toolbars that must not take up too much screen area. In other respects, it's the
same as a wxFrame.
same as a wx.Frame.
"""

View File

@ -1,21 +1,3 @@
# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 11/30/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o wx renamer needs to be applied to multisash lib.
# o There appears to be a problem with the image that
# the library is trying to use for the alternate cursor
#
# 12/09/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o renamer issue shelved.
#
# 12/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o wxMultiSash -> MultiSash
#
import wx
import wx.lib.multisash as sash

View File

@ -1,15 +1,3 @@
# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 11/30/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o wx renamer not applied to lib.
#
# 12/18/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o wxMultipleChoiceDialog -> MultipleChoiceDialog
#
import wx
import wx.lib.dialogs
@ -40,7 +28,7 @@ This is a Python implementation of a dialog that is not yet implemented in wxWin
proper, so don't let the wxWindows documentation mislead you.
<p><code><b>MultipleChoiceDialog</b>(self, parent, msg, title, lst,
pos = wx.wxDefaultPosition, size = (200,200), style = wx.wxDEFAULT_DIALOG_STYLE)
pos = wx.wxDefaultPosition, size = (200,200), style = wx.DEFAULT_DIALOG_STYLE)
</code>
<dl>

View File

@ -1,7 +1,3 @@
# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import sys
@ -116,14 +112,14 @@ def runTest(frame, nb, log):
overview = """\
<html><body>
<h2>wxNotebook</h2>
<h2>wx.Notebook</h2>
<p>
This class represents a notebook control, which manages multiple
windows with associated tabs.
<p>
To use the class, create a wxNotebook object and call AddPage or
To use the class, create a wx.Notebook 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.
delete the window for a page that is currently managed by wx.Notebook.
"""

View File

@ -313,7 +313,7 @@ class __Cleanup:
def __del__(self):
self.cleanup()
# when this module gets cleaned up then wxOGLCleanUp() will get called
# when this module gets cleaned up then wx.OGLCleanUp() will get called
__cu = __Cleanup()

View File

@ -1,7 +1,3 @@
# 11/13/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx
import wx.html as wxhtml

View File

@ -1,7 +1,3 @@
# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx
@ -37,12 +33,12 @@ The page setup dialog contains controls for paper size (A4, A5 etc.), orientatio
(landscape or portrait), and controls for setting left, top, right and bottom margin
sizes in millimetres.
When the dialog has been closed, you need to query the <code>wxPageSetupDialogData</code> object
When the dialog has been closed, you need to query the <code>wx.PageSetupDialogData</code> object
associated with the dialog.
Note that the OK and Cancel buttons do not destroy the dialog; this must be done by
the application. As with other dialogs, do not destroy the dialog until you are done
with the data, and, conversely, do not use the wxPageSetupDialogData after the
with the data, and, conversely, do not use the wx.PageSetupDialogData after the
dialog is destroyed.

View File

@ -1,12 +1,7 @@
# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 11/30/2003 - Jeff Grimmett (grimmtooth@softhome.net)
# wx.lib.wxPlotCanvas is deprecated. Use wx.lib.plot instead.
#
# o wxPlotCanvas must be updated with new draw mechanics (tuples) before
# it can be used with 2.5.
#
import wx
import wx.lib.wxPlotCanvas as plot

View File

@ -1,15 +1,3 @@
# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 11/30/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Is it just me or are the graphics for the control not lining up right?
#
# 12/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o wxPopupControl -> PopupControl
#
import wx
import wx.lib.popupctl as pop
@ -89,12 +77,12 @@ overview = """<html><body>
<h2><center>PopupControl</center></h2>
PopupControl is a class that can display a value and has a button
that will popup another window similar to how a wxComboBox works. The
that will popup another window similar to how a wx.ComboBox works. The
popup window can contain whatever is needed to edit the value. This
example uses a wxCalendarCtrl.
example uses a wx.CalendarCtrl.
<p>Currently a wxDialog is used for the popup. Eventually a
wxPopupWindow should be used...
<p>Currently a wx.Dialog is used for the popup. Eventually a
wx.PopupWindow should be used...
</body></html>
"""

View File

@ -1,6 +1,3 @@
# 11/13/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
import wx

View File

@ -1,14 +1,9 @@
# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 11/30/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Some issues with the listbox example; I tried correcting
# it but it's still not working the way it should. Commented
# out for now but will be revisited.
# o The math in determining the popup window's position is
# a bit off.
# out for now, as I found it.
#
import wx
@ -23,7 +18,7 @@ except NameError:
#---------------------------------------------------------------------------
class TestPopup(wx.PopupWindow):
"""Adds a bit of text and mouse movement to the wxPopupWindow"""
"""Adds a bit of text and mouse movement to the wx.PopupWindow"""
def __init__(self, parent, style):
wx.PopupWindow.__init__(self, parent, style)
self.SetBackgroundColour("CADET BLUE")
@ -76,15 +71,15 @@ class TestPopup(wx.PopupWindow):
class TestTransientPopup(wx.PopupTransientWindow):
"""Adds a bit of text and mouse movement to the wxPopupWindow"""
"""Adds a bit of text and mouse movement to the wx.PopupWindow"""
def __init__(self, parent, style, log):
wx.PopupTransientWindow.__init__(self, parent, style)
self.log = log
panel = wx.Panel(self, -1)
panel.SetBackgroundColour("#FFB6C1")
st = wx.StaticText(panel, -1,
"wxPopupTransientWindow is a\n"
"wxPopupWindow which disappears\n"
"wx.PopupTransientWindow is a\n"
"wx.PopupWindow which disappears\n"
"automatically when the user\n"
"clicks the mouse outside it or if it\n"
"(or its first child) loses focus in \n"
@ -109,16 +104,16 @@ class TestPanel(wx.Panel):
wx.Panel.__init__(self, parent, -1)
self.log = log
b = wx.Button(self, -1, "Show wxPopupWindow", (25, 50))
b = wx.Button(self, -1, "Show wx.PopupWindow", (25, 50))
self.Bind(wx.EVT_BUTTON, self.OnShowPopup, b)
b = wx.Button(self, -1, "Show wxPopupTransientWindow", (25, 95))
b = wx.Button(self, -1, "Show wx.PopupTransientWindow", (25, 95))
self.Bind(wx.EVT_BUTTON, self.OnShowPopupTransient, b)
# This isn't working so well, not sure why. Commented out for
# now.
# b = wx.Button(self, -1, "Show wxPopupWindow with listbox", (25, 140))
# b = wx.Button(self, -1, "Show wx.PopupWindow with listbox", (25, 140))
# self.Bind(wx.EVT_BUTTON, self.OnShowPopupListbox, b)
@ -160,6 +155,10 @@ class TestPanel(wx.Panel):
win.Show(True)
# This class is currently not implemented in the demo. It does not
# behave the way it should, so for the time being it's only here
# for show. If you figure out how to make it work, please send
# a corrected file to Robin!
class TestPopupWithListbox(wx.PopupWindow):
def __init__(self, parent, style, log):
wx.PopupWindow.__init__(self, parent, style)
@ -197,7 +196,7 @@ def runTest(frame, nb, log):
return win
else:
dlg = wx.MessageDialog(
frame, 'wxPopupWindow is not available on this platform.',
frame, 'wx.PopupWindow is not available on this platform.',
'Sorry', wx.OK | wx.ICON_INFORMATION
)

View File

@ -1,7 +1,3 @@
# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx
#---------------------------------------------------------------------------
@ -29,9 +25,9 @@ def runTest(frame, nb, log):
overview = """\
This class represents the print and print setup common dialogs. You may obtain
a wxPrinterDC device context from a successfully dismissed print dialog.
a wx.PrinterDC device context from a successfully dismissed print dialog.
User information is stored in a wxPrintDialogData object that is passed to the
User information is stored in a wx.PrintDialogData object that is passed to the
dialog at creation time, and it is filled in by the user. As with other dialogs,
do not use this data once the dialog is dismissed, and do not destroy the dialog
until you have everything you need from it.

View File

@ -1,9 +1,3 @@
# 11/13/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
# o Got rid of static buton IDs
# o Took at a stab at a lucid overview string.
#
import wx
import ScrolledWindow

View File

@ -1,7 +1,3 @@
# 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx
@ -15,8 +11,8 @@ class TestPanel(wx.Panel):
self.process = None
self.Bind(wx.EVT_IDLE, self.OnIdle)
# We can either derive from wxProcess and override OnTerminate
# or we can let wxProcess send this window an event that is
# We can either derive from wx.Process and override OnTerminate
# or we can let wx.Process send this window an event that is
# caught in the normal way...
self.Bind(wx.EVT_END_PROCESS, self.OnProcessEnded)
@ -139,9 +135,9 @@ def runTest(frame, nb, log):
overview = """\
<html><body>
<h2>wxProcess</h2>
<h2>wx.Process</h2>
wxProcess lets you get notified when an asyncronous child process
wx.Process lets you get notified when an asyncronous child process
started by wxExecute terminates, and also to get input/output streams
for the child process's stdout, stderr and stdin.

View File

@ -1,16 +1,3 @@
# 11/21/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 12/14/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated URL for SF link in overview.
#
# 12/21/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o wxPyColorChooser -> PyColorChooser
# o wxPyColourChooser -> PyColourChooser
#
import wx
import wx.lib.colourchooser as cc

View File

@ -1,7 +1,3 @@
# 11/13/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx.py as py

View File

@ -1,7 +1,3 @@
# 11/15/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o New demo
#
import wx
import wx.lib.plot

View File

@ -1,7 +1,3 @@
# 11/13/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx.py as py

View File

@ -1,7 +1,3 @@
# 11/13/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import sys

View File

@ -1,7 +1,3 @@
# 11/21/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx
@ -26,7 +22,7 @@ class TestRadioBox(wx.Panel):
self.Bind(wx.EVT_RADIOBOX, self.EvtRadioBox, rb)
#rb.SetBackgroundColour(wx.BLUE)
rb.SetToolTip(wx.ToolTip("This is a ToolTip!"))
#rb.SetLabel("wxRadioBox")
#rb.SetLabel("wx.RadioBox")
sizer.Add(rb, 0, wx.ALL, 20)
@ -46,10 +42,6 @@ class TestRadioBox(wx.Panel):
def EvtRadioBox(self, event):
self.log.WriteText('EvtRadioBox: %d\n' % event.GetInt())
# Doesn't appear to be used for anything.
# def EvtRadioButton(self, event):
# self.log.write('EvtRadioButton:%d\n' % event.GetId())
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
@ -59,9 +51,10 @@ def runTest(frame, nb, log):
overview = """\
A radio box item is used to select one of number of mutually exclusive
A RadioBox is used to select one of a number of mutually exclusive
choices. It is displayed as a vertical column or horizontal row of
labelled buttons.
labelled buttons, surrounded by a box that can optionally have a
label.
"""

View File

@ -1,7 +1,3 @@
# 11/21/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
import wx
@ -114,9 +110,9 @@ overview = """\
This demo shows how individual radio buttons can be used to build
more complicated selection mechanisms...
<P>
It uses 2 groups of wxRadioButtons, where the groups are defined by
instantiation. When a wxRadioButton is created with the <I>wxRB_GROUP</I>
style, all subsequent wxRadioButtons created without it are implicitly
It uses 2 groups of wx.RadioButtons, where the groups are defined by
instantiation. When a wx.RadioButton is created with the <I>wx.RB_GROUP</I>
style, all subsequent wx.RadioButtons created without it are implicitly
added to that group by the framework.
</body></html>
"""

View File

@ -1,28 +1,11 @@
# 11/21/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
#
# 11/30/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o The rightalign library needs converted for this to work correctly.
#
# 12/11/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o All issues resolved.
#
# 12/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o wxRightTextCtrl -> RightTextCtrl
#
############################################################################\
# Note: this demo has been converted, but the control is deprecated because |
# wx.TextCtrl now supports the wx.TE_RIGHT style flag, which makes this |
# control completely superfluous. |
############################################################################/
#####################################################################\
# Note: This control is deprecated because wx.TextCtrl now supports |
# the wx.TE_RIGHT style flag, which makes this control completely |
# superfluous. |
#####################################################################/
import wx
import wx.lib.rightalign as right
import wx.lib.rightalign as right
#----------------------------------------------------------------------

View File

@ -1,12 +1,3 @@
# 11/13/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Updated for wx namespace
# o Gotta fix the overview.
#
# 11/26/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# o Overview fixed.
#
import wx
import wx.lib.rcsizer as rcs

Some files were not shown because too many files have changed in this diff Show More