moving a button out of a panel

crazymarvin

Member
Joined
Nov 22, 2006
Messages
18
Location
Belfast, UK
Programming Experience
Beginner
hey, I have a button inside a panel (pnlBoxesA) and i need to move out of the panel onto the main form. Any ideas how i can do this?
 
Click View menu
Expand Other Windows sub menu
Pick Document Outline

You are now looking at a legendary bit of stuff that all good graphics and design programs have, showing you the layers, and Z order of EVERYTHING. You can select stuff, and drag stuff between panels or reorder controls to appear on top of others. Try it, you might like it!

This advice to be used in conjunction with Juggalo's..
 
the document outline is a brilliant tip, its very usefull when your useing alot of controls, id never seen it before

I never really explained the orginal thread very well, what id actuly meant was moveing the box with code rather than the ide. e.g.
VB.NET:
(controlname).Location = new point(x,y)

What I needed to do was move the button out of the panel, when useing the method above, you can only move it around inside the panel. Any ideas?
 
Change the controls Parent property, or add it to a different parents Controls collection. For example now btn.Parent is Panel1, change it to form: btn.Parent = Me or form123.Controls.Add(btn)
 
Back
Top