-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Description
Modified demo code:
from vanilla import Window, HorizontalRadioGroup, VerticalRadioGroup
class RadioGroupDemo:
def __init__(self):
self.w = Window((300, 100))
self.w.radioGroup = HorizontalRadioGroup(
"auto",
["Option 1", "Option 2"],
callback=self.radioGroupCallback
)
self.w.radioGroup.set(0)
self.w.radioGroup.enable(True) # <-- added line
rules = [
"H:|-[radioGroup]-|",
"V:|-[radioGroup(==%d)]-|" % self.w.radioGroup.getFittingHeight()
]
self.w.addAutoPosSizeRules(rules)
self.w.open()
def radioGroupCallback(self, sender):
print("radio group edit!", sender.get())
RadioGroupDemo()
enable()
throws a traceback for HorizontalRadioGroup
and VerticalRadioGroup
. It works for RadioGroup
.
Traceback (most recent call last):
File "test_radiogroup.py", line 24, in <module>
RadioGroupDemo()
File "test_radiogroup.py", line 13, in __init__
self.w.radioGroup.enable(True)
File "venv/lib/python3.10/site-packages/vanilla/vanillaBase.py", line 158, in enable
self._nsObject.setEnabled_(onOff)
AttributeError: 'VNSStackView' object has no attribute 'setEnabled_'
Metadata
Metadata
Assignees
Labels
No labels