A rectangle is taking possession of everything

I have a simple yellowish rectangle drawn in a sector of a window. On top of it there are some textfields to collect data. The only reason is to hilite the area where the user should work on; the rectangle and the textfields should be completely unrelated but if I delete it everything goes as well. I made sure th rectangle is in the lowest level compared with the textfields but it appears to own whatever is on top.
Another thing that happens is that if I type something in the first textfield, and hit tab, the content gets stored but the field shows blank, something the other fields don’t do.
I have no idea why it happens.

It sounds like the rectangle is the parent of the other controls. Either your make sure that the rectangle and the textfields overlap and one isn’t contained in the other (for instance make the rectangle very small in the editor and set the proper size when compiling). Or you do a me.parent = nil in the open event of the rectangle.

… or draw a yellow rectangle in the window (Window1.Paint event) ?

When you drag other controls on top of the rectangle, notice the red outline on the rectangle : it means it is becoming parent of the controls. As a result, these controls become tied to the rectangle.

Before deleting the rectangle, move the inner controls out and make sure the red outline is gone.