merge from 2.8 branch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44403 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -110,8 +110,8 @@ class TestPanel(wx.Panel):
|
||||
useMetal = self.cb.IsChecked()
|
||||
|
||||
dlg = TestDialog(self, -1, "Sample Dialog", size=(350, 200),
|
||||
#style=wxCAPTION | wxSYSTEM_MENU | wxTHICK_FRAME,
|
||||
style=wx.DEFAULT_DIALOG_STYLE,
|
||||
#style=wx.CAPTION | wx.SYSTEM_MENU | wx.THICK_FRAME,
|
||||
style=wx.DEFAULT_DIALOG_STYLE, # & ~wx.CLOSE_BOX,
|
||||
useMetal=useMetal,
|
||||
)
|
||||
dlg.CenterOnScreen()
|
||||
|
@@ -58,6 +58,11 @@ class DragCanvas(wx.ScrolledWindow):
|
||||
shape.fullscreen = True
|
||||
self.shapes.append(shape)
|
||||
|
||||
bmp = images.getTheKidBitmap()
|
||||
shape = DragShape(bmp)
|
||||
shape.pos = (200, 5)
|
||||
self.shapes.append(shape)
|
||||
|
||||
# Make a shape from some text
|
||||
text = "Some Text"
|
||||
bg_colour = wx.Colour(57, 115, 57) # matches the bg image
|
||||
@@ -84,11 +89,6 @@ class DragCanvas(wx.ScrolledWindow):
|
||||
self.shapes.append(shape)
|
||||
|
||||
|
||||
bmp = images.getTheKidBitmap()
|
||||
shape = DragShape(bmp)
|
||||
shape.pos = (200, 5)
|
||||
self.shapes.append(shape)
|
||||
|
||||
self.Bind(wx.EVT_ERASE_BACKGROUND, self.OnEraseBackground)
|
||||
self.Bind(wx.EVT_PAINT, self.OnPaint)
|
||||
self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)
|
||||
|
@@ -1374,6 +1374,7 @@ class wxPythonDemo(wx.Frame):
|
||||
#---------------------------------------------
|
||||
|
||||
def RecreateTree(self, evt=None):
|
||||
self.tree.Freeze()
|
||||
self.tree.DeleteAllItems()
|
||||
self.root = self.tree.AddRoot("wxPython Overview")
|
||||
firstChild = None
|
||||
@@ -1393,6 +1394,7 @@ class wxPythonDemo(wx.Frame):
|
||||
self.tree.Expand(firstChild)
|
||||
if filter:
|
||||
self.tree.ExpandAll()
|
||||
self.tree.Thaw()
|
||||
|
||||
def WriteText(self, text):
|
||||
if text[-1:] == '\n':
|
||||
@@ -1685,9 +1687,17 @@ class wxPythonDemo(wx.Frame):
|
||||
|
||||
|
||||
def OnOpenWidgetInspector(self, evt):
|
||||
# Activate the widget inspector that was mixed in with the
|
||||
# app, see MyApp and MyApp.OnInit below.
|
||||
wx.GetApp().ShowInspectionTool()
|
||||
# Activate the widget inspection tool
|
||||
from wx.lib.inspect import InspectionTool
|
||||
if not InspectionTool().initialized:
|
||||
InspectionTool().Init()
|
||||
|
||||
# Find a widget to be selected in the tree. Use either the
|
||||
# one under the cursor, if any, or this frame.
|
||||
wnd = wx.FindWindowAtPointer()
|
||||
if not wnd:
|
||||
wnd = self
|
||||
InspectionTool().Show(wnd, True)
|
||||
|
||||
|
||||
#---------------------------------------------
|
||||
@@ -1789,8 +1799,7 @@ class MySplashScreen(wx.SplashScreen):
|
||||
self.Raise()
|
||||
|
||||
|
||||
import wx.lib.mixins.inspect
|
||||
class MyApp(wx.App, wx.lib.mixins.inspect.InspectionMixin):
|
||||
class MyApp(wx.App):
|
||||
def OnInit(self):
|
||||
"""
|
||||
Create and show the splash screen. It will then create and show
|
||||
@@ -1811,9 +1820,6 @@ class MyApp(wx.App, wx.lib.mixins.inspect.InspectionMixin):
|
||||
splash = MySplashScreen()
|
||||
splash.Show()
|
||||
|
||||
# Setup the InspectionMixin
|
||||
self.Init()
|
||||
|
||||
return True
|
||||
|
||||
|
||||
|
@@ -41,8 +41,9 @@ class TestPanel(wx.Panel):
|
||||
|
||||
self.Bind(wx.EVT_SEARCHCTRL_SEARCH_BTN, self.OnSearch, self.search)
|
||||
self.Bind(wx.EVT_SEARCHCTRL_CANCEL_BTN, self.OnCancel, self.search)
|
||||
self.search.Bind(wx.EVT_TEXT_ENTER, self.OnDoSearch, self.search)
|
||||
|
||||
self.Bind(wx.EVT_TEXT_ENTER, self.OnDoSearch, self.search)
|
||||
##self.Bind(wx.EVT_TEXT, self.OnDoSearch, self.search)
|
||||
|
||||
|
||||
def OnToggleSearchButton(self, evt):
|
||||
self.search.ShowSearchButton( evt.GetInt() )
|
||||
|
@@ -310,7 +310,9 @@ def runTest(frame, nb, log):
|
||||
win = TestPanel(nb, log)
|
||||
return win
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = wx.PySimpleApp()
|
||||
dlg = FormDialog()
|
||||
dlg.ShowModal()
|
||||
|
||||
if __name__ == '__main__':
|
||||
import sys,os
|
||||
import run
|
||||
run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])
|
||||
|
||||
|
Reference in New Issue
Block a user