TextEditor virtual methods request


Hi Jules and everybody,

I’m trying to make a new TextEditor component (for example I want a different shape for the box). Having a look in the api I found that TextEditor methods are not virtual, so I can’t inheritance and re-implement the paint method

Do you think it would be possible to make some of that functions virtual so we can re-implement them?

I don’t know if there is a better way to do it but I think it would be interesting to have this change.



Have you checked out the LookAndFeel class?



The TextEditor component inherit from Component which have its paint method virtual. So TextEditor::paint IS actually virtual.



If you want “a different shape for the box” then you can make a subclass of LookAndFeel and implement your own version of:

and give the text editor “box” rounded corners for example.