Using Drawable Rectangle

Hello,

I'm trying to add a Drawable Rectangle by doing the following...   I can't seem to get it to display, can you tell me what I'm doing wrong?

 

//component.h file

private:

DrawableRectangle test;

 

//component.cpp file constructor

addAndMakeVisible(test);

 

//component.cpp paint function

test.setFill((Colours::orange));

 

//component.cpp resized function

test.setBounds(10,10,45,45);

 

 

 

I think you have to use DrawableRectangle::setRectangle(). I just tried it and can confirm that it works.