Very easy. Set at the top of your Script the following:

PANEL* my_pan;

Now the Compiler knows your Panel will be definied later and after that you can use the text.pos_x = my_pan.pos_x.
After that you can define your Panel:

PANEL* my_pan =
{
...
...
}

You can also use digits to show strings in a Panel and so you don`t have to update the Textpos.