# these are code excerps from the program # this is the data for the list control 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 : ('') # i load the list like this: 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) # when list is clicked on this tries to do the scrolling, works in part. 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) #this is the template I use to put in the Pi #like this: #drugreferencefullpidict= AuMed_DBI_DrugReferenceFull.drugreferencefull_getpi_by_mancode(mancode) #html=pitemplate%drugreferencefullpidict[0] #which works well and displays stuff on the screen: ############################################################################################## #NOTE THAT IT JUMPS OK TO THE TAG FOR COMPOSITION AND INDICATION BUT NOTHING ELSE!!!!!!!!!!!! ############################################################################################## pitemplate = """