TextButton leftChannelButton { "A" };
TextButton rightChannelButton { "B" };
In PluginEditor.cpp, I tried:
leftChannelButton.setFont (32.0f);
but that failed to compile because:
PluginEditor.cpp:45:23: error: no member named 'setFont' in 'juce::TextButton'
leftChannelButton.setFont (32.0f);
~~~~~~~~~~~~~~~~~ ^
1 error generated.
HI, you need to learn about the Juce LookAndFeel concept, create a custom LookAndFeel, assign it to your TextButtons, and then override LookAndFeel::drawButtonText().
Most of the GUI design will involve working with LookAndFeels.
I forgot to mention the above actually scales the text inside the button to it’s size, less a margin off course which you can tweak with the parameter mentioned.
Thanks @DKDiveDude. Another question – not sure if it’s a JUCE question or a C++ question, but – why did you comment out the parameter names like that?
It’s a c/c++ thing. The arguments are required for the override of the function. However, if you’re not going to use those variables inside the function, you can comment out the names like that and you will then not get compiler warnings about unused variables.