Easiest way to do vertical zoom in/out in a painted grid

Hello. I’m thinking how can I do something like a “piano roll”. I’ve created two objects, a vertical zoom button and a grid component (which is a simple component with a grid painted with its Paint method and a zoom value). The button has a pointer to the grid component.

These two component where added to a third one.

However I don’t have a clue about how I should re-call to the grid Paint(Graphics &g) method when I change the zoom value, how should I do it?

Have a read about Component::repaint()

(The comments for Component::paint explain the way it works pretty clearly, don’t they??)

upa! I think I need to sleep more. Thanks Jules :slight_smile: