Use of Unity Canvas

i'm trying to do project where there are three buttons and when you tap one button, a panel with a text appear.
The problem is when I attached the script, nothing happens.
The "click" is registered but the the panel never come up.

My script is attached to each of the button and is something like this:

public GameObject panel; (i use to put the panel in unity)

bool selected = false;

void Start () {

panel.SetActive(false);

}

void OnSelect() {

selected = !selected;
panel.SetActive(true);

}

I probably have to do something else with the panel but I can't figure it out.