diff --git a/demo/Gauge.py b/demo/Gauge.py index e749b8d3..34df7677 100644 --- a/demo/Gauge.py +++ b/demo/Gauge.py @@ -12,11 +12,11 @@ class TestPanel(wx.Panel): 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.g2 = wx.Gauge(self, -1, 75, (110, 95), (250, 25)) - self.g3 = wx.Gauge(self, -1, 100, (110, 135), (25, 100), wx.GA_VERTICAL) - # self.g3.SetBezelFace(12) - # self.g3.SetShadowWidth(8) + self.g1 = wx.Gauge(self, -1, 50, (110, 50), (250, -1)) + self.g2 = wx.Gauge(self, -1, 75, (110, 95), (250, -1)) + + if 'wxMac' not in wx.PlaformInfo: + self.g3 = wx.Gauge(self, -1, 100, (110, 135), (-1, 100), wx.GA_VERTICAL) self.Bind(wx.EVT_TIMER, self.TimerHandler) self.timer = wx.Timer(self) @@ -33,7 +33,8 @@ class TestPanel(wx.Panel): self.g1.SetValue(self.count) self.g2.Pulse() - self.g3.Pulse() + if 'wxMac' not in wx.PlaformInfo: + self.g3.Pulse() #---------------------------------------------------------------------- diff --git a/demo/ItemsPicker.py b/demo/ItemsPicker.py index d800417f..2fd4bbd8 100644 --- a/demo/ItemsPicker.py +++ b/demo/ItemsPicker.py @@ -53,21 +53,30 @@ class ItemsPickerDialog(wx.Dialog): 'Stuff:', 'Selected stuff:',ipStyle = style) self.ip.Bind(EVT_IP_SELECTION_CHANGED, self.OnSelectionChange) self.ip._source.SetMinSize((-1,150)) - self.ip.bAdd.SetBitmap(_bp_btn2.GetBitmap(), dir=wx.RIGHT) - self.ip.bAdd.SetLabel('Add') - self.ip.bRemove.SetBitmap(_bp_btn1.GetBitmap(), dir=wx.LEFT) - self.ip.bRemove.SetLabel('Remove') + + # Customize the buttons for this example. + if 'wxMac' not in wx.PlatformInfo: + # NOTE: wx.Button on OSX does not modify the button size when adding a + # bitmap after the fact like this, and these bitmaps are a little too + # large and look funny in OSX, so we won't do this customization there. + self.ip.bAdd.SetBitmap(_bp_btn2.GetBitmap(), dir=wx.RIGHT) + self.ip.bAdd.SetLabel('Add') + self.ip.bRemove.SetBitmap(_bp_btn1.GetBitmap(), dir=wx.LEFT) + self.ip.bRemove.SetLabel('Remove') + sizer.Add(self.ip, 0, wx.ALL, 10) self.SetSizer(sizer) self.itemCount = 3 self.Fit() + def OnAdd(self,e): items = self.ip.GetItems() self.itemCount += 1 newItem = "item%d" % self.itemCount self.ip.SetItems(items + [newItem]) + def OnSelectionChange(self, e): self.log.write("EVT_IP_SELECTION_CHANGED %s\n" % \ ",".join(e.GetItems())) diff --git a/demo/data/widgetTest.htm b/demo/data/widgetTest.htm index ae27d62e..9527ed02 100644 --- a/demo/data/widgetTest.htm +++ b/demo/data/widgetTest.htm @@ -12,7 +12,7 @@

Mixing wxPython and wxHTML

The widgets on this page were created dynamically on the fly by a -custom wxTagHandler found in wxPython.lib.wxpTag. You can look at the +custom wxTagHandler found in wx.lib.wxpTag. You can look at the sources and doc-string in the wxPython library at wx/lib/wxpTag.py.

@@ -45,10 +45,10 @@ parameter value. Source code is here.

+ - diff --git a/demo/widgetTest.py b/demo/widgetTest.py index f81dd4a6..42522988 100644 --- a/demo/widgetTest.py +++ b/demo/widgetTest.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# This file is used for the wx.HtmlWindow demo. +# This file is used for the HtmlWindow demo. import sys