jumptolistdata = { 0 : ('Actions'), 1 : ('Adverse Reactions'), 2 : ('Composition'), 3 : ('Contraindictions'), 4 : ('Dose & Administration'), 5 : ('Indications'), 6 : ('Interactions'), 7 : ('Lactation'), 8 : ('Overdose'), 9 : ('Poisons Schedule'), 10 : ('Precautions'), 11 : ('Pregnancy'), 12 : ('Presentation'), 13 : ('Storage'), 14 : (''), 15 : ('Company Details'), 16 : (''), 17 : ('Available Brands'), 18 : ('') def PopulateList(self): items = jumptolistdata.items() ItemDataMap = jumptolistdata for x in range(len(items)): key, data = items[x] self.list.InsertStringItem(x, data) self.list.SetColumnWidth(0, wx.LIST_AUTOSIZE) def OnJumpToListSelected(self,evt): """user has clicked on the list of sub-headings available to peruse the PI scroll down to expose the corresponding section""" if self.centrepanel.drughtmlwindow.IsShown(): anchor = self.sidepanel.list.GetItem(evt.m_itemIndex, 0).GetText().strip() self.centrepanel.drughtmlwindow.ScrollToAnchor(anchor) pitemplate = """