Hey Erwin,
Yes, you're right. The child will remain 'inside' of the parent. If you let the user drag a child window within the parent, then any part that 'should' display outside of the parent frame will be clipped. I guess I was interpreting what you were asking for another way.
If only a separated panel is desired, then you already have what you need. If the user says, no, I want it docked now instead of separated, then you close the 'legend', LoadPanel() the legend as a child, widen the graph (parent) enough to hold the legend, and then display the child legend on say the right side of the graph as not moveable. Now it will go with the window when it is dragged and draw as you requested.
Of course, if you want to be able to put the legend on the left and the graph on the right, just as easily as vice-versa, then perhaps it would be better to have the graph as a child as well, so that you can move the whole blocks around each other in only a few function calls. Essentially this makes CVI run like a multiple document interface (MDI).
Just like what you show below, the child legend would still have the scroll bar so you could ensure that it doesn't extend below the graph. If they say, great, now I don't want any legend at all, you must narrow the graph window but you decide whether to leave the legend in memory or to ditch it. Not sure if you like these approaches. They work pretty well for me sometimes.
Good luck,
Orlan