From: Robin Dunn Date: Sat, 18 Nov 2006 00:31:59 +0000 (+0000) Subject: demo tweaks X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/3b339f106ca9fa0243f37dc9a5ec9e9509efa1e3 demo tweaks git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43484 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/demo/ComboCtrl.py b/wxPython/demo/ComboCtrl.py index 3b4f5e917e..9c6b745184 100644 --- a/wxPython/demo/ComboCtrl.py +++ b/wxPython/demo/ComboCtrl.py @@ -68,8 +68,7 @@ class ListCtrlComboPopup(wx.ListCtrl, wx.combo.ComboPopup): def Create(self, parent): self.log.write("ListCtrlComboPopup.Create") wx.ListCtrl.Create(self, parent, - style=wx.LC_LIST|wx.LC_SINGLE_SEL| - wx.LC_SORT_ASCENDING|wx.SIMPLE_BORDER) + style=wx.LC_LIST|wx.LC_SINGLE_SEL|wx.SIMPLE_BORDER) self.Bind(wx.EVT_MOTION, self.OnMotion) self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown) return True @@ -316,12 +315,12 @@ class FileSelectorCombo(wx.combo.ComboCtrl): wx.combo.ComboCtrl.__init__(self, *args, **kw) # make a custom bitmap showing "..." - bw, bh = 16, 16 + bw, bh = 14, 16 bmp = wx.EmptyBitmap(bw,bh) dc = wx.MemoryDC(bmp) # clear to a specific background colour - bgcolor = wx.Colour(255,0,255) + bgcolor = wx.Colour(255,254,255) dc.SetBackground(wx.Brush(bgcolor)) dc.Clear() @@ -331,7 +330,6 @@ class FileSelectorCombo(wx.combo.ComboCtrl): font.SetWeight(wx.FONTWEIGHT_BOLD) dc.SetFont(font) tw,th = dc.GetTextExtent(label) - print tw, th dc.DrawText(label, (bw-tw)/2, (bw-tw)/2) del dc @@ -458,6 +456,10 @@ def runTest(frame, nb, log): overview = """

wx.combo.ComboCtrl

+A combo control is a generic combobox that allows a totally custom +popup. In addition it has other customization features. For instance, +position and size of the dropdown button can be changed. + """