How to add text to label

This is the code I have below, it only changes the text when I change the slider value. How can it change the code so it changes the text when the program loads straight away.

		double freq = text.removeCharacters("Hz").getDoubleValue();
		return (freq);
	lpKnob->textFromValueFunction = [](double value)
		double freq = (value);
		return juce::String(freq) + "Hz";


Maybe try to set the lambda before calling addAndMakeVisible…

yep that worked well thanks, also needed to do the attachment after