2025-09-10 2:03 PM
Hi all,
Can you please give me some pointers how to update the text and needle positions on the custom containers?
I have a gui that has multiple images, exactly the same text and gauge positions. I created the custom container that has different text fields and one gauge.
With single gauge and multiple text fields on the same view, I am successfully update these peripherals, but when I create multiple copies of the same custom containers I lost, and I don't know how to access the text fields and gauge's needle.
For example:
I created customContainer = 2 text fields and 1 gauge
In then mainView I have customContainer1, customContainer2, customContainer3 and I don't know how to access those text fields and the the gauge.
thank you for your time.
Solved! Go to Solution.
2025-09-11 5:06 PM
I found a way to implement multiple buttons from this #2 inspiration
Then i add the helper function from customContainer base, the confusion is understand how to replicate the customContainer
//A helper to update text in customContainer header file
virtual void Text(int val);
//A function in .cpp
void customContainer::updateIntensityText(int val)
{
Unicode::snprintf(textAreaIntensityBuffer, TEXTAREAINTENSITY_SIZE, "%d", val);
textAreaIntensity.invalidate();
gauge.setValue(val);
gauge.invalidate();
}
2025-09-11 5:06 PM
I found a way to implement multiple buttons from this #2 inspiration
Then i add the helper function from customContainer base, the confusion is understand how to replicate the customContainer
//A helper to update text in customContainer header file
virtual void Text(int val);
//A function in .cpp
void customContainer::updateIntensityText(int val)
{
Unicode::snprintf(textAreaIntensityBuffer, TEXTAREAINTENSITY_SIZE, "%d", val);
textAreaIntensity.invalidate();
gauge.setValue(val);
gauge.invalidate();
}
2025-09-12 3:52 AM
It looks like found the same solution to update fields inside a custom container as I would have suggested.
Can you explain more about what you now are confused about?
2025-09-12 8:57 AM
Hi Peter,
Thank you for checking. It was a comment that I was confused because of multiple instances of the customContainer but not anymore after I understand the concept.