]> git.saurik.com Git - wxWidgets.git/commitdiff
A couple fixes for the demo, and some code to show a bug
authorRobin Dunn <robin@alldunn.com>
Sat, 28 Jul 2001 03:06:02 +0000 (03:06 +0000)
committerRobin Dunn <robin@alldunn.com>
Sat, 28 Jul 2001 03:06:02 +0000 (03:06 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11199 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/demo/GridCustEditor.py
wxPython/demo/wxHtmlWindow.py
wxPython/demo/wxTextCtrl.py

index a24cbf5fa15b22f8c89fc127380a9db1e0dabdbe..8f9ed931e487a352d09f36b9e00b0d1b887817e3 100644 (file)
@@ -46,7 +46,8 @@ class MyCellEditor(wxPyGridCellEditor):
         PaintBackground and do something meaningful there.
         """
         self.log.write("MyCellEditor: SetSize %s\n" % rect)
         PaintBackground and do something meaningful there.
         """
         self.log.write("MyCellEditor: SetSize %s\n" % rect)
-        self._tc.SetDimensions(rect.x, rect.y, rect.width+2, rect.height+2)
+        self._tc.SetDimensions(rect.x, rect.y, rect.width+2, rect.height+2,
+                               wxSIZE_ALLOW_MINUS_ONE)
 
 
     def Show(self, show, attr):
 
 
     def Show(self, show, attr):
index e2e902d865b3cb567204b0bec86d597ba319675a..69d1d12e02f4f7a952c28b3380de214845e7fe08 100644 (file)
@@ -139,6 +139,7 @@ class TestHtmlPanel(wxPanel):
 
 
     def OnPrint(self, event):
 
 
     def OnPrint(self, event):
+        ##self.printer.GetPageSetupData().SetMarginTopLeft((100,100))
         self.printer.PrintFile(self.html.GetOpenedPage())
 
 #----------------------------------------------------------------------
         self.printer.PrintFile(self.html.GetOpenedPage())
 
 #----------------------------------------------------------------------
index 58d25e7d3afdffdeec4dcc4e774da18df4f75c01..c27bee37efb63acb7b32ef800c9728237d0e79e1 100644 (file)
@@ -4,6 +4,13 @@ from wxPython.wx import *
 #---------------------------------------------------------------------------
 
 class TestPanel(wxPanel):
 #---------------------------------------------------------------------------
 
 class TestPanel(wxPanel):
+    def OnSetFocus(self, evt):
+        print "OnSetFocus"
+        evt.Skip()
+    def OnKillFocus(self, evt):
+        print "OnKillFocus"
+        evt.Skip()
+
     def __init__(self, parent, log):
         wxPanel.__init__(self, parent, -1)
         self.log = log
     def __init__(self, parent, log):
         wxPanel.__init__(self, parent, -1)
         self.log = log
@@ -13,6 +20,8 @@ class TestPanel(wxPanel):
         t1.SetInsertionPoint(0)
         EVT_TEXT(self, 10, self.EvtText)
         EVT_CHAR(t1, self.EvtChar)
         t1.SetInsertionPoint(0)
         EVT_TEXT(self, 10, self.EvtText)
         EVT_CHAR(t1, self.EvtChar)
+        EVT_SET_FOCUS(t1, self.OnSetFocus)
+        EVT_KILL_FOCUS(t1, self.OnKillFocus)
 
 
         l2 = wxStaticText(self, -1, "Passsword")
 
 
         l2 = wxStaticText(self, -1, "Passsword")