wxSizer.Show, IsShown, etc.

Wrappers for and use new wxInputStream methods
Other tweaks, fixes, etc. to go along with recent CVS changes.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-11-05 23:03:34 +00:00
parent 9ac8b5637a
commit 8f5c320767
23 changed files with 816 additions and 79 deletions

View File

@@ -280,18 +280,19 @@ class wxGenButton(wxPyControl):
def OnLeftUp(self, event):
if not self.IsEnabled() or not self.HasCapture():
return
self.ReleaseMouse()
if not self.up: # if the button was down when the mouse was released...
self.Notify()
self.up = true
self.Refresh()
event.Skip()
if self.HasCapture():
self.ReleaseMouse()
if not self.up: # if the button was down when the mouse was released...
self.Notify()
self.up = true
self.Refresh()
event.Skip()
def OnMotion(self, event):
if not self.IsEnabled() or not self.HasCapture():
return
if event.LeftIsDown():
if event.LeftIsDown() and self.HasCapture():
x,y = event.GetPositionTuple()
w,h = self.GetClientSizeTuple()
if self.up and x<w and x>=0 and y<h and y>=0:
@@ -487,14 +488,31 @@ class __ToggleMixin:
def OnLeftUp(self, event):
if not self.IsEnabled() or not self.HasCapture():
return
if self.up != self.saveUp:
self.Notify()
self.ReleaseMouse()
self.Refresh()
if self.HasCapture():
if self.up != self.saveUp:
self.Notify()
self.ReleaseMouse()
self.Refresh()
def OnKeyDown(self, event):
event.Skip()
def OnMotion(self, event):
if not self.IsEnabled():
return
if event.LeftIsDown() and self.HasCapture():
x,y = event.GetPositionTuple()
w,h = self.GetClientSizeTuple()
if x<w and x>=0 and y<h and y>=0:
self.up = not self.saveUp
self.Refresh()
return
if (x<0 or y<0 or x>=w or y>=h):
self.up = self.saveUp
self.Refresh()
return
event.Skip()
def OnKeyUp(self, event):
if self.hasFocus and event.KeyCode() == ord(" "):
self.up = not self.up

View File

@@ -32,7 +32,7 @@ imported. It probably is not installed (it's not part of the standard
Python distribution). See the Python site (http://www.python.org) for
information on downloading source or binaries."""
if wxPlatform == '__WXMSW__':
if wx.wxPlatform == '__WXMSW__':
d = wx.wxMessageDialog(wx.NULL, msg, "Numeric not found")
if d.ShowModal() == wx.wxID_CANCEL:
d = wx.wxMessageDialog(wx.NULL, "I kid you not! Pressing Cancel won't help you!", "Not a joke", wx.wxOK)