Lots of spelling errors fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@24040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -11,7 +11,7 @@ you can use just like wxWindow, (set the size and position, use in a
|
|||||||
sizer, etc.) except its contents will be the COM control.
|
sizer, etc.) except its contents will be the COM control.
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
This demo embeds the Internet Exploer WebBrowser control, and shows
|
This demo embeds the Internet Explorer WebBrowser control, and shows
|
||||||
how to receive events from the COM control. (The title bar and status
|
how to receive events from the COM control. (The title bar and status
|
||||||
bar are updated as pages change, in addition to the log messages being
|
bar are updated as pages change, in addition to the log messages being
|
||||||
shown.)
|
shown.)
|
||||||
|
@@ -28,7 +28,7 @@ class TestWindow(wxScrolledWindow):
|
|||||||
dc = wxClientDC(self)
|
dc = wxClientDC(self)
|
||||||
dc.SetFont(self.font)
|
dc.SetFont(self.font)
|
||||||
|
|
||||||
w,h,d,e = dc.GetFullTextExtent("Wy") # a wide character and one that decends
|
w,h,d,e = dc.GetFullTextExtent("Wy") # a wide character and one that descends
|
||||||
self.textHeight = h + d
|
self.textHeight = h + d
|
||||||
self.lineHeight = self.textHeight + 5
|
self.lineHeight = self.textHeight + 5
|
||||||
self.cellWidth = w
|
self.cellWidth = w
|
||||||
|
@@ -81,8 +81,8 @@ def runTest(frame, nb, log):
|
|||||||
|
|
||||||
|
|
||||||
overview = """
|
overview = """
|
||||||
This demo shows how to encorporate Context Sensitive
|
This demo shows how to incorporate Context Sensitive
|
||||||
help into your applicaiton using the wxSimpleHelpProvider class.
|
help into your application using the wxSimpleHelpProvider class.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@@ -58,7 +58,7 @@ def makeRandomRectangles(num, W, H):
|
|||||||
|
|
||||||
|
|
||||||
def makeRandomText(num):
|
def makeRandomText(num):
|
||||||
Np = 8 # number of charcters in text
|
Np = 8 # number of characters in text
|
||||||
text = []
|
text = []
|
||||||
for i in range(num):
|
for i in range(num):
|
||||||
word = []
|
word = []
|
||||||
@@ -386,7 +386,7 @@ drawing routines. Currently they are:
|
|||||||
DrawLineList(sequence, pens=None)
|
DrawLineList(sequence, pens=None)
|
||||||
</pre>
|
</pre>
|
||||||
Where sequence is a tuple, list, whatever of 4 element tuples
|
Where sequence is a tuple, list, whatever of 4 element tuples
|
||||||
(x1,y1, x2,y2) andd pens is either None, a single pen or a list
|
(x1,y1, x2,y2) and pens is either None, a single pen or a list
|
||||||
of pens.
|
of pens.
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
|
@@ -359,7 +359,7 @@ else:
|
|||||||
|
|
||||||
I'd like the cursor to change as you change tools, but the stock
|
I'd like the cursor to change as you change tools, but the stock
|
||||||
wxCursors didn't include anything I liked, so I stuck with the
|
wxCursors didn't include anything I liked, so I stuck with the
|
||||||
pointer. Pleae let me know if you have any nice cursor images for me to
|
pointer. Please let me know if you have any nice cursor images for me to
|
||||||
use.
|
use.
|
||||||
|
|
||||||
|
|
||||||
@@ -399,7 +399,7 @@ else:
|
|||||||
segment = []
|
segment = []
|
||||||
for line in data:
|
for line in data:
|
||||||
if line:
|
if line:
|
||||||
if line == "# -b": #New segment begining
|
if line == "# -b": #New segment beginning
|
||||||
if segment: Shorelines.append(array(segment))
|
if segment: Shorelines.append(array(segment))
|
||||||
segment = []
|
segment = []
|
||||||
else:
|
else:
|
||||||
|
@@ -83,7 +83,7 @@ class CustomDataTable(wxPyGridTableBase):
|
|||||||
|
|
||||||
# Called to determine the kind of editor/renderer to use by
|
# Called to determine the kind of editor/renderer to use by
|
||||||
# default, doesn't necessarily have to be the same type used
|
# default, doesn't necessarily have to be the same type used
|
||||||
# nativly by the editor/renderer if they know how to convert.
|
# natively by the editor/renderer if they know how to convert.
|
||||||
def GetTypeName(self, row, col):
|
def GetTypeName(self, row, col):
|
||||||
return self.dataTypes[col]
|
return self.dataTypes[col]
|
||||||
|
|
||||||
|
@@ -158,7 +158,7 @@ class SimpleGrid(wxGrid): ##, wxGridAutoEditMixin):
|
|||||||
|
|
||||||
# Show how to stay in a cell that has bad data. We can't just
|
# Show how to stay in a cell that has bad data. We can't just
|
||||||
# call SetGridCursor here since we are nested inside one so it
|
# call SetGridCursor here since we are nested inside one so it
|
||||||
# won't have any effect. Instead, set coordinants to move to in
|
# won't have any effect. Instead, set coordinates to move to in
|
||||||
# idle time.
|
# idle time.
|
||||||
value = self.GetCellValue(evt.GetRow(), evt.GetCol())
|
value = self.GetCellValue(evt.GetRow(), evt.GetCol())
|
||||||
if value == 'no good':
|
if value == 'no good':
|
||||||
|
@@ -98,7 +98,7 @@ _treeList = [
|
|||||||
'wxValidator',
|
'wxValidator',
|
||||||
]),
|
]),
|
||||||
|
|
||||||
# controls coming from other librairies
|
# controls coming from other libraries
|
||||||
('More Windows/Controls', [
|
('More Windows/Controls', [
|
||||||
#'wxFloatBar', deprecated
|
#'wxFloatBar', deprecated
|
||||||
#'wxMVCTree', deprecated
|
#'wxMVCTree', deprecated
|
||||||
@@ -806,7 +806,7 @@ platform GUI library, which is written in C++.
|
|||||||
<p> Like Python and wxWindows, wxPython is <b>Open Source</b> which
|
<p> Like Python and wxWindows, wxPython is <b>Open Source</b> which
|
||||||
means that it is free for anyone to use and the source code is
|
means that it is free for anyone to use and the source code is
|
||||||
available for anyone to look at and modify. Or anyone can contribute
|
available for anyone to look at and modify. Or anyone can contribute
|
||||||
fixes or enhnacments to the project.
|
fixes or enhancements to the project.
|
||||||
|
|
||||||
<p> wxPython is a <b>cross-platform</b> toolkit. This means that the
|
<p> wxPython is a <b>cross-platform</b> toolkit. This means that the
|
||||||
same program will run on multiple platforms without modification.
|
same program will run on multiple platforms without modification.
|
||||||
|
@@ -69,7 +69,7 @@ class MyPrintout(wxPrintout):
|
|||||||
# Use x or y scaling factor, whichever fits on the DC
|
# Use x or y scaling factor, whichever fits on the DC
|
||||||
actualScale = min(scaleX, scaleY)
|
actualScale = min(scaleX, scaleY)
|
||||||
|
|
||||||
# Calculate the position on the DC for centring the graphic
|
# Calculate the position on the DC for centering the graphic
|
||||||
posX = (w - (self.canvas.getWidth() * actualScale)) / 2.0
|
posX = (w - (self.canvas.getWidth() * actualScale)) / 2.0
|
||||||
posY = (h - (self.canvas.getHeight() * actualScale)) / 2.0
|
posY = (h - (self.canvas.getHeight() * actualScale)) / 2.0
|
||||||
|
|
||||||
|
@@ -77,7 +77,7 @@ def runTest(frame, nb, log):
|
|||||||
|
|
||||||
|
|
||||||
overview = """\
|
overview = """\
|
||||||
This demo is a contrived example of defining an event class in wxPython and sending it up the containment heirachy for processing.
|
This demo is a contrived example of defining an event class in wxPython and sending it up the containment hierarchy for processing.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
@@ -362,7 +362,7 @@ theTests = [
|
|||||||
),
|
),
|
||||||
|
|
||||||
("Add a stretchable", makeSimpleBox3,
|
("Add a stretchable", makeSimpleBox3,
|
||||||
"We've added one more button with the strechable flag turned on. Notice "
|
"We've added one more button with the stretchable flag turned on. Notice "
|
||||||
"how it grows to fill the extra space in the otherwise fixed dimension."
|
"how it grows to fill the extra space in the otherwise fixed dimension."
|
||||||
),
|
),
|
||||||
|
|
||||||
@@ -372,7 +372,7 @@ theTests = [
|
|||||||
),
|
),
|
||||||
|
|
||||||
("Weighting factor", makeSimpleBox5,
|
("Weighting factor", makeSimpleBox5,
|
||||||
"This one shows more than one strechable, but one of them has a weighting "
|
"This one shows more than one stretchable, but one of them has a weighting "
|
||||||
"factor so it gets more of the free space."
|
"factor so it gets more of the free space."
|
||||||
),
|
),
|
||||||
|
|
||||||
@@ -421,7 +421,7 @@ theTests = [
|
|||||||
),
|
),
|
||||||
|
|
||||||
("Boxes inside a Border", makeBoxInBorder,
|
("Boxes inside a Border", makeBoxInBorder,
|
||||||
"Sizers of different types can be nested withing each other as well. "
|
"Sizers of different types can be nested within each other as well. "
|
||||||
"Here is a box sizer with several buttons embedded within a border sizer."
|
"Here is a box sizer with several buttons embedded within a border sizer."
|
||||||
),
|
),
|
||||||
|
|
||||||
@@ -434,7 +434,7 @@ theTests = [
|
|||||||
("Simple Grid", makeGrid1,
|
("Simple Grid", makeGrid1,
|
||||||
"This is an example of the wxGridSizer. In this case all row heights "
|
"This is an example of the wxGridSizer. In this case all row heights "
|
||||||
"and column widths are kept the same as all the others and all items "
|
"and column widths are kept the same as all the others and all items "
|
||||||
"fill their available space. The horzontal and vertical gaps are set to "
|
"fill their available space. The horizontal and vertical gaps are set to "
|
||||||
"2 pixels each."
|
"2 pixels each."
|
||||||
),
|
),
|
||||||
|
|
||||||
@@ -461,7 +461,7 @@ theTests = [
|
|||||||
|
|
||||||
("Proportional resize", makeSimpleBoxShaped,
|
("Proportional resize", makeSimpleBoxShaped,
|
||||||
"Managed items can preserve their original aspect ratio. The last item has the "
|
"Managed items can preserve their original aspect ratio. The last item has the "
|
||||||
"wxSHAPED flag set and will resize proportional to its origingal size."
|
"wxSHAPED flag set and will resize proportional to its original size."
|
||||||
),
|
),
|
||||||
|
|
||||||
("Proportional resize with Alignments", makeShapes,
|
("Proportional resize with Alignments", makeShapes,
|
||||||
|
@@ -223,7 +223,7 @@ so any cross platform GUI Toolkit and applications written with it
|
|||||||
need to take that into account.
|
need to take that into account.
|
||||||
|
|
||||||
The solution is to only allow interaction with the GUI from a single
|
The solution is to only allow interaction with the GUI from a single
|
||||||
thread, but this often severly limits what can be done in an
|
thread, but this often severely limits what can be done in an
|
||||||
application and makes it difficult to use additional threads at all.
|
application and makes it difficult to use additional threads at all.
|
||||||
|
|
||||||
Since wxPython already makes extensive use of event handlers, it is a
|
Since wxPython already makes extensive use of event handlers, it is a
|
||||||
|
@@ -93,7 +93,7 @@ class MyApp(wx.App):
|
|||||||
while self.Pending():
|
while self.Pending():
|
||||||
self.Dispatch()
|
self.Dispatch()
|
||||||
|
|
||||||
# Send idle events to idle handlers. You may want to throtle
|
# Send idle events to idle handlers. You may want to throttle
|
||||||
# this back a bit so there is not too much CPU time spent in
|
# this back a bit so there is not too much CPU time spent in
|
||||||
# the idle handlers. For this example, I'll just snooze a
|
# the idle handlers. For this example, I'll just snooze a
|
||||||
# little...
|
# little...
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
"""Basic regular expression demostration facility (Perl style syntax)."""
|
"""Basic regular expression demonstration facility (Perl style syntax)."""
|
||||||
|
|
||||||
from wxPython.wx import *
|
from wxPython.wx import *
|
||||||
import re
|
import re
|
||||||
|
@@ -35,9 +35,9 @@
|
|||||||
When using wxPython, the call to app.Mainloop() takes over
|
When using wxPython, the call to app.Mainloop() takes over
|
||||||
the thread from which it is called. This presents a
|
the thread from which it is called. This presents a
|
||||||
problem for applications that want to use the standard
|
problem for applications that want to use the standard
|
||||||
Python command line user interface, while occasionaly
|
Python command line user interface, while occasionally
|
||||||
creating a GUI window for viewing an image, plot, etc.
|
creating a GUI window for viewing an image, plot, etc.
|
||||||
One soultion is to mangage the GUI in a second thread.
|
One solution is to manage the GUI in a second thread.
|
||||||
|
|
||||||
wxPython does not behave well if windows are created in
|
wxPython does not behave well if windows are created in
|
||||||
a thread other than the one where wxPython was originally
|
a thread other than the one where wxPython was originally
|
||||||
|
@@ -481,7 +481,7 @@ class PrintCalend:
|
|||||||
|
|
||||||
year, month = self.IncMonth(year, month)
|
year, month = self.IncMonth(year, month)
|
||||||
y = y + 3.5
|
y = y + 3.5
|
||||||
x = x + 4.0 # next colum
|
x = x + 4.0 # next column
|
||||||
|
|
||||||
DC.EndDrawing()
|
DC.EndDrawing()
|
||||||
|
|
||||||
|
@@ -194,7 +194,7 @@ class DragCanvas(wxScrolledWindow):
|
|||||||
if not self.dragShape or not evt.Dragging() or not evt.LeftIsDown():
|
if not self.dragShape or not evt.Dragging() or not evt.LeftIsDown():
|
||||||
return
|
return
|
||||||
|
|
||||||
# if we have a shape, but havn't started dragging yet
|
# if we have a shape, but haven't started dragging yet
|
||||||
if self.dragShape and not self.dragImage:
|
if self.dragShape and not self.dragImage:
|
||||||
|
|
||||||
# only start the drag after having moved a couple pixels
|
# only start the drag after having moved a couple pixels
|
||||||
|
@@ -16,7 +16,7 @@ def runTest(frame, nb, log):
|
|||||||
"This is a simple text editor, the class name is",
|
"This is a simple text editor, the class name is",
|
||||||
"wxEditor. Type a few lines and try it out.",
|
"wxEditor. Type a few lines and try it out.",
|
||||||
"",
|
"",
|
||||||
"It uses Windows-style key commands that can be overriden by subclassing.",
|
"It uses Windows-style key commands that can be overridden by subclassing.",
|
||||||
"Mouse select works. Here are the key commands:",
|
"Mouse select works. Here are the key commands:",
|
||||||
"",
|
"",
|
||||||
"Cursor movement: Arrow keys or mouse",
|
"Cursor movement: Arrow keys or mouse",
|
||||||
|
@@ -8,7 +8,7 @@ text = """\
|
|||||||
Right-click on the panel to get a menu. This menu will be managed by
|
Right-click on the panel to get a menu. This menu will be managed by
|
||||||
a wxFileHistory object and so the files you select will automatically
|
a wxFileHistory object and so the files you select will automatically
|
||||||
be added to the end of the menu and will be selectable the next time
|
be added to the end of the menu and will be selectable the next time
|
||||||
the menu is viewed. The filename selcted, either via the Open menu
|
the menu is viewed. The filename selected, either via the Open menu
|
||||||
item, or from the history, will be displayed in the log window below.
|
item, or from the history, will be displayed in the log window below.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@@ -61,7 +61,7 @@ class TestVirtualList(wxListCtrl):
|
|||||||
# "virtualness" of the list... Normally you would
|
# "virtualness" of the list... Normally you would
|
||||||
# determine the text, attributes and/or image based
|
# determine the text, attributes and/or image based
|
||||||
# on values from some external data source, but for
|
# on values from some external data source, but for
|
||||||
# this demo we'll just calcualte them
|
# this demo we'll just calculate them
|
||||||
def OnGetItemText(self, item, col):
|
def OnGetItemText(self, item, col):
|
||||||
return "Item %d, column %d" % (item, col)
|
return "Item %d, column %d" % (item, col)
|
||||||
|
|
||||||
|
@@ -16,7 +16,7 @@ the name suggests, you can define styles that can be applied to
|
|||||||
sections of text. This will typically be used for things like
|
sections of text. This will typically be used for things like
|
||||||
syntax highlighting code editors, but I'm sure that there are other
|
syntax highlighting code editors, but I'm sure that there are other
|
||||||
applications as well. A style is a combination of font, point size,
|
applications as well. A style is a combination of font, point size,
|
||||||
forground and background colours. The editor can handle
|
foreground and background colours. The editor can handle
|
||||||
proportional fonts just as easily as monospaced fonts, and various
|
proportional fonts just as easily as monospaced fonts, and various
|
||||||
styles can use different sized fonts.
|
styles can use different sized fonts.
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ class MySTC(wxStyledTextCtrl):
|
|||||||
% (evt.GetX(), evt.GetY(), evt.GetPosition(), evt.GetDragResult()))
|
% (evt.GetX(), evt.GetY(), evt.GetPosition(), evt.GetDragResult()))
|
||||||
|
|
||||||
if debug and evt.GetPosition() < 250:
|
if debug and evt.GetPosition() < 250:
|
||||||
evt.SetDragResult(wxDragNone) # prevent dropping at the begining of the buffer
|
evt.SetDragResult(wxDragNone) # prevent dropping at the beginning of the buffer
|
||||||
|
|
||||||
|
|
||||||
def OnDoDrop(self, evt):
|
def OnDoDrop(self, evt):
|
||||||
|
Reference in New Issue
Block a user