Skip to content

Commit

Permalink
[MenuList] add getList/setList property
Browse files Browse the repository at this point in the history
  • Loading branch information
Huevos committed Oct 7, 2023
1 parent 3a5c0ec commit e4f0c66
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/python/Components/MenuList.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class MenuList(GUIComponent):
def __init__(self, list, enableWrapAround=True, content=eListboxPythonStringContent):
GUIComponent.__init__(self)
self.l = content()
self.setList(list)
self.list = list
self.onSelectionChanged = []
self.enableWrapAround = enableWrapAround

Expand Down Expand Up @@ -36,8 +36,13 @@ def getSelectedIndex(self):
return self.l.getCurrentSelectionIndex()

def setList(self, list):
self.list = list
self.l.setList(self.list)
self.__list = list
self.l.setList(self.__list)

def getList(self):
return self.__list

list = property(getList, setList)

def moveToIndex(self, idx):
if self.instance is not None:
Expand Down

0 comments on commit e4f0c66

Please sign in to comment.