Scroll through options with buttons

This is off the top of my head, and so may not be the best solution:

Create your buttons as usual, and assign their command to some method that you define. For each button, set their “extraArgs” to indicate which part is being scrolled (perhaps use constants for this), and -1 for “scroll back” buttons and 1 for “scroll forwards” buttons. Put another way, the “extraArgs” for one arbitrary button might look something like this: [PART_HEAD, 1], where “PART_HEAD” is an integer constant defined elsewhere by you, and “1” indicates that this button scrolls forwards. Store your parts in a set of lists somewhere, and store a list of indices describing which parts are being used by the current model.

Your method would then do something like this (roughly):

def scrollPart(self, partID, dirToScroll):
    partList = self.listOfPartLists[partID]
    # self.modelIndices holds the indices of the current model
    index = self.modelIndices[partID]
    index += dirToScroll
    if index < 0:
        index = len(partList)-1
    elif index >= len(partList):
        index = 0
    self.modelIndices[partID] = index

    #  Now, using "index", get the part from "partList", remove the part being replaced,
    # and assign the new part to the model.

You could