Canvas indexed

Hello friends,
For example, I have 8 indexed canvasses (CV(0…7)) representing pushbuttons with a text from 1 to 8.
They are painted red with a white border.
When I click on one I want to draw a yellow border to show it’s activated.
But when I click on different buttons, the previous ones remain with a yellow border.
If anyone has an idea how to solve this I would be very grateful.

  g.FillRect 0, 0, g.Width, g.Height
  if Index = Case_Nbr_Lettres_Select  Then
    g.ForeColor = clYellow
    g.ForeColor = clWhite
  end if

You need to refresh all the other canvases.

1 Like

on “click”, after setting the Case_Nbr_Lettres_Select you have to refresh all the related canvas

How to refresh indexed canvases?

.Refresh does not works ?

I am sorry Emile, I do not find how to refresh all canvas(s)es.

You have to do them one by one:

// etc

Thanks to you three.
I placed that in the MouseDown event and it works like a charm Tim!