Yes, you can do the following:cont = event.source.parent.getComponent("someContainer")
for comp in cont.getComponents():
print comp.name
comp.enabled = 1
Taking this code one step ahead… is there a way to determine what type of component is in the cycle?
For instance, let’s say I only want to disable the text fields but not the numeric fields.
Something like:
cont = event.source.parent.getComponent("someContainer")
for comp in cont.getComponents():
print comp.name
if comp.type=="textField":
comp.enabled = 0
Yes, but the type is kind of hidden to you:cont = event.source.parent.getComponent("someContainer")
for comp in cont.getComponents():
print comp.name
if str(comp.getClass()).endswith("PMINumericTextField"):
comp.enabled = 0Now to get the actual type you can copy the component from the designer and paste it into a text editor. There you will see the type like PMINumericTextField.