Hi.

In my programm i should to switch between to screen. On first screen i have a panel with 3 buttons. I create this panel in run-time mode. When i press a button on the panel i remove this panel panel and create a new panel. But on the screen i see a new panel and 2 buttons from the old panel. Buttons is not active. I dont know how to refresh a screen.
My code:

PANEL *Start_pan;
PANEL *Top_pan;

char* sStart_pan = "bmap = Start_pan.jpg;
button (381, 229, btnStart_d, btnStart_u, btnStart_u, Init, NULL, NULL);
button (381, 363, btnSett_d, btnSett_u, btnSett_u, Change_Mode, NULL, NULL);
button (381, 493, btnExit_d, btnExit_u, btnExit_u, Change_Mode, NULL, NULL);
flags = OVERLAY;";


char* sTop_pan = "bmap = top_panel.jpg;
pos_x = 0; pos_y = 0;
button (381, 229, btnStart_d, btnStart_u, btnStart_u, NULL, NULL, NULL);
button (381, 363, btnSett_d, btnSett_u, btnSett_u, NULL, NULL, NULL);
flags = OVERLAY;

function Init()
{
if (Start_pan!=NULL) pan_remove(Start_pan);
//if (Top_pan!=NULL) pan_remove(Top_pan);
level_free();
wait(500);
wait(500);
Top_pan = pan_create(sTop_pan,1);
set(Top_pan, VISIBLE);
level_load("");
}

function main()
{

video_mode = 8;
video_screen = 2;
mouse_mode = 4;
Start_pan = pan_create(sStart_pan,1);
}