Hi Stefano, yeah, much the newbie here. So if the custom component is named PinColumn2 and looks like the following (it is a card with a bunch of labels):
And I have the following dict (obviously hard-coded here for testing):
values = [
{‘label_pin’: ‘20-24-322-002-0001’, ‘label_agla’: ‘2,338’, ‘label_distance’: ‘0.000001’}
]
How would I get the labels in the custom component to display the values in my dict? For my app, there will always be 6 columns and I just dropped 6 instances of the custom component into the parent form. They are named custom_1 through custom_6 and I would know all label values.
Thanks,
David
EDIT: Not sure if this is right or not, but here’s what I ended up doing:
On the custom component, I manually set the data bindings, as shown below:
Then from the main component, I just ran the following:
values = [
{'label_pin': '20-24-322-002-0001', 'label_agla': '2,338', 'label_distance': '0.000001'}
]
self.custom_1.item = values
And this is what came out:
Obviously, I need to fill in the rest, but I was also able to modify specific attributes of the label, like the color.