ganz einfach
main_pan.VISIBLE=ON;
wird zu
main_pan.flags |= VISIBLE;