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 = """ DrugReferenceFull_Template.html

%(product)s

Generic Components 

%(generic)s

Composition

%(composition)s

Description

%(description)s

Action

%(actions)s

Indications 

%(indications)s

Contraindications 

%(contraindications)s

Warnings 

%(warnings)s

Precautions 

%(precautions)s

Adverse Reactions 

%(adverse_reactions)s

Interactions 

%(interactions)s

Overdosage 

%(overdosage)s

Dose and Administration 

%(dose_administration)s

Directions for Use 

%(directions_use)s

Presentation 

%(presentation)s

Storage

%(storage)s

Poisons Schedule

%(poisons_schedule)s

Mims Annual

%(mimsannualref)s