简体   繁体   中英

Control extending beyond border of parent control

Is there any way to create a control that will allow its children controls to extend beyond its border? I thought about using ToolStripDropDown but i want the children to move with the parent. I want it to look
like that

Windows Forms doesn't support this. Controls must be child windows, they have their TopLevel property set to False. Which confines them to their container. There's only one Control-derived class that has TopLevel = true, the Form class. ToolTip and ContextMenuStrip are top level windows too, but they are components.

The reason it has this restriction is that top level windows behave poorly in the designer. You can however create them in code. Check out my answer in this thread to see how to do that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM