Some newbie TextEditor questions


#1

I am just getting started with Juce and have come up with some TextEditor questions:

  1. I would like the editor to operate in an over-write mode where the character at the cursor is always replaced with the typed character rather than the new character being inserted. How can this be done?

  2. After I create the TextEditor object I call setTextToShowWhenEmpty("00000.00", juce::Colour::fromRGB(13,0,0)); The TextEditor correctly displays the “00000.00” string when empty but I don’t see the color change, is there something else I need to do here?

  3. I only allow numeric values ( using a filter ). I would like to display trailing and leading zero’s with a different color, for example given the string “003.14” the 2 leading zeros would be a different color from the 3.14. What is the best way to do this?

Thanks!