Button Components and dynamic content


When I make a new button component, I’m not sure I can change the label, colour etc. of the contents without making the button non-editable from Jucer.

Does that make sense? So for instance, label or caption and ‘base colour’ could be a variable that can be changed in user code.

[code] String buttonCaption(_T(“Devices”); // Jucer generated
Colour buttonBaseColour(0xffa6de87);

//[UserCode_appearance] -- Add your code here...

       g.setColour (buttonBaseColour);
        g.fillRoundedRectangle (0.0f, 0.0f, 80.0f, 20.0f, 3.5000f);
        g.drawText (buttonCaption),
                    0, 2, 80, 18,
                    Justification::centred, true);




I’m just doing a shake-up of the colour stuff at the moment, so the next version may help out with this…