Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def get(self, first, last=None):
- result = []
- for l in self.lists:
- result.append(l.get(first, last))
- if last: return list(map(*[None] + result))
- return result
- def index(self, index):
- self.lists[0].index(index)
- def insert(self, index, *elements): #Elements = the fields in a row.
- # Loop through each field in the row
- for e in elements:
- # Each field will have an index number. Ex: e[0] = ID, e[1] = Date, etc.
- i = 0
- for l in self.lists:
- # Insert each field in its applicable list box
- # Insert a blank if the field is None, otherwise boxes won't align.
- if e[i] == None:
- l.insert(index, " ")
- else:
- l.insert(index, e[i])
- i = i + 1
- def Size(self):
- return self.lists[0].size()
- def see(self, index):
- for l in self.lists:
- l.see(index)
- def SelectionClear(self, first, last=None):
- # Unselects the entire line by looping over each of the list boxes that make up the MLB.
- for l in self.lists:
- l.selection_clear(first, last)
- def SelectionSet(self, first, last=None)
- self.item_selected = [first, ] + self.get(first)
- for l in self.lists:
- # Sets the selection to the same row in all list boxes
- l.selection_set(first, last)
- def not_focus(self):
- for l in self.lists:
- l['takefocus'] = False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement