X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/299647acac7960652aadb008775429c1f8ea9b8d..b69d3db804c9db392533ea25cdb5c5feace9c011:/wxPython/demo/VListBox.py?ds=sidebyside diff --git a/wxPython/demo/VListBox.py b/wxPython/demo/VListBox.py index cbe7707698..30cec2b5f3 100644 --- a/wxPython/demo/VListBox.py +++ b/wxPython/demo/VListBox.py @@ -1,13 +1,9 @@ -# 11/22/2003 - Jeff Grimmett (grimmtooth@softhome.net) -# -# o Updated for wx namespace -# import wx #---------------------------------------------------------------------- -# The wxVListBox is much like a regular wxListBox except you draw the +# The wx.VListBox is much like a regular wx.ListBox except you draw the # items yourself and the items can vary in height. class MyVListBox(wx.VListBox): @@ -18,7 +14,8 @@ class MyVListBox(wx.VListBox): if self.GetSelection() == n: c = wx.SystemSettings.GetColour(wx.SYS_COLOUR_HIGHLIGHTTEXT) else: - c = self.GetForegroundColour()#wx.SystemSettings.GetColour(wx.SYS_COLOUR_HIGHLIGHTTEXT) + c = self.GetForegroundColour()#wx.SystemSettings.GetColour(wx.SYS_COLOUR_HIGHLIGHTTEXT) + dc.SetFont(self.GetFont()) dc.SetTextForeground(c) dc.DrawLabel(self._getItemText(n), rect, wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL) @@ -109,7 +106,7 @@ def runTest(frame, nb, log): overview = """ -

wxVListBox and wxHtmlListBox

+

wx.VListBox and wx.HtmlListBox


The "V" in wxVListBox stands for both "virtual" because it can have an @@ -119,8 +116,8 @@ interface as wxListBox and also emits the same events so you can use the same EVT_LISTBOX function to connect a handler.

-The wxHtmlListBox derives from wxVListBox, but draws each item itself -as a wxHtmlCell. This means that you just need to provide a snippet +The wx.HtmlListBox derives from wx.VListBox, but draws each item itself +as a wx.HtmlCell. This means that you just need to provide a snippet of HTML for each item when requested. @@ -131,5 +128,5 @@ of HTML for each item when requested. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])