;ò ÷ÍDc@sÄdkZdeifd„ƒYZdeifd„ƒYZdeifd„ƒYZd„ZdZe d joPdk Z dk Z dk Z e i d e iie id ƒge id ƒndS( Ns MyVListBoxcBs#tZd„Zd„Zd„ZRS(NcCs‚|iƒ|jotiitiƒ}n |iƒ}|i |i ƒƒ|i |ƒ|i |i|ƒ|titiBƒdS(N(sselfs GetSelectionsnswxsSystemSettingss GetColoursSYS_COLOUR_HIGHLIGHTTEXTscsGetForegroundColoursdcsSetFontsGetFontsSetTextForegrounds DrawLabels _getItemTextsrects ALIGN_LEFTsALIGN_CENTER_VERTICAL(sselfsdcsrectsnsc((sh/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/VListBox.pys OnDrawItem s  cCsTd}x?|i|ƒidƒD]%}|i|ƒ\}}||7}qW|dSdS(Nis i( sheightsselfs _getItemTextsnssplitslines GetTextExtentswsh(sselfsnshsheightswsline((sh/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/VListBox.pys OnMeasureItems cCs)|ddjo d|Sn d|SdS(NiisThis is item# %ds$This is item# %d with an extra line(sitem(sselfsitem((sh/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/VListBox.pys _getItemText+s (s__name__s __module__s OnDrawItems OnMeasureItems _getItemText(((sh/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/VListBox.pys MyVListBoxs s MyHtmlListBoxcBstZd„ZRS(NcCs)|ddjo d|Sn d|SdS(NiisThis is item# %dsFThis is item# %d
Any HTML is okay.(sn(sselfsn((sh/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/VListBox.pys OnGetItem7s (s__name__s __module__s OnGetItem(((sh/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/VListBox.pys MyHtmlListBox5ss TestPanelcBstZd„ZRS(Nc CsÕ||_tii||dƒd}t|ddddfdtiƒ}|i dƒ|i dƒ|i ƒti tiƒ}|i||fƒ|iti|ddƒdd tiƒ|i|ƒt|ddddfdtiƒ}|i dƒ|i dƒti tiƒ}|i||fƒ|iti|dd ƒdd tiƒ|i|ƒti tiƒ}|i||fƒ|i|ƒ|i||fƒ|i||fƒ|i|ƒ|i|ƒdS( Niÿÿÿÿi2ssizei–iússtyleis wx.VListBoxiswx.HtmlListBox(slogsselfswxsPanels__init__sparentsspacers MyVListBoxs BORDER_SUNKENsvlbs SetItemCounts SetSelectionsSetFocussBoxSizersVERTICALsvlbSizersAdds StaticTextsALLs MyHtmlListBoxshlbshlbSizers HORIZONTALssizersSetSizer( sselfsparentslogsvlbssizersspacersvlbSizershlbSizershlb((sh/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/VListBox.pys__init__@s2 $   ( $  (   (s__name__s __module__s__init__(((sh/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/VListBox.pys TestPanel?scCst||ƒ}|SdS(N(s TestPanelsnbslogswin(sframesnbslogswin((sh/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/VListBox.pysrunTestbssX

wx.VListBox and wx.HtmlListBox


The "V" in wxVListBox stands for both "virtual" because it can have an unlimited number of items since it doesn't store them itself, and "variable" since items can vary in height. It has much the same interface as wxListBox and also emits the same events so you can use the same EVT_LISTBOX function to connect a handler.

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. s__main__sii(swxsVListBoxs MyVListBoxs HtmlListBoxs MyHtmlListBoxsPanels TestPanelsrunTestsoverviews__name__ssyssossrunsmainspathsbasenamesargv( ssyssrunsoverviews MyVListBoxsrunTestswxsoss MyHtmlListBoxs TestPanel((sh/mnt/gmirror/ports/x11-toolkits/py-wxPython26-common/work/wxPython-src-2.6.3.3/wxPython/demo/VListBox.pys?s - #