I have a Label on CategoryPanel and trying to change it's caption onMouseEnter and onMouseLeave events
void __fastcall TForm1::Label1MouseEnter(TObject *Sender)
{
Label1->Caption="On";
}
void __fastcall TForm1::Label1MouseLeave(TObject *Sender)
{
Label1->Caption="Off";
}
but label caption does not redraw. Both texts are shown simultaneously ("On" and "Off"). I tried to use
Label1->Repaint();
but as it seems it does not work.