def jumpprevious(pEvent, pFileNames=pFileNames, pLabel=TopLabel):
        'Event handler for previous file button'
        lFileName = pLabel.cget("text").strip()
        lPos = pFileNames.index(lFileName) - 1
        if lPos <= 0 :
            lPos = 0
            pLabel.config(bg="#FF0000")
            PrevButton.config(state=DISABLED)
        else:
            pLabel.config(bg="#FF8800")
        NextButton.config(state=NORMAL)
        lFileName = pFileNames[lPos].center(60)
        pLabel.config(text=lFileName)
Event handler for previous file button
recipes/Python/577039_Moderately_Simple_Buttonbar/recipe-577039.py