Click here to Skip to main content
6,597,576 members and growing! (18,593 online)
Email Password   helpLost your password?
Desktop Development » Miscellaneous » Miscellaneous Controls     Intermediate

Docking control with tear-away frame tool windows

By Iridar

A container control that tears away into a tool window when dragged
C#, .NET, Win2K, WinXP, Win2003, Visual Studio, Dev
Posted:6 Jul 2003
Views:79,702
Bookmarked:40 times
Announcements
Loading...
 
Search    
Advanced Search
Add to IE Search
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
9 votes for this article.
Popularity: 4.00 Rating: 4.19 out of 5
2 votes, 22.2%
1

2

3
1 vote, 11.1%
4
6 votes, 66.7%
5

Introduction

Well, never being one to be easily satisfied, I was quite happy to find Phil Wright's excellent article on docking controls. However, I of course wanted more. I wanted a control that would behave like a container in the design environment, and would allow me to tear it away from the sides of its container and drop it wherever I wanted it.

So, using Phil's work as a base (thanks, Phil!) I extended his control to give it a little more design flexibility and a way to move it around more like a Visual Studio tool window.

Using the control is simple. Just copy the .cs and .resx files into your project directory and include them in the project itself. You'll either have to add an Images directory to your project for the tool's icon or change the [ToolboxBitmap ....] line in the .cs file to point to an image you want to use. Then, use it like any other control.

Known issues with this version:

  1. No location serialization - the control does not remember where it was placed between iterations.
  2. Control does not always size correctly when dragged and docked to an edge.
  3. Does not always play nicely with the design environment - I've had it lose child controls, somewhat intermittently.

Anyhow, it needs a little work (I'll try to keep new versions posted), but it's enough to get you started. Enjoy!

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Iridar


Member

Location: United States United States

Other popular Miscellaneous articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 17 of 17 (Total in Forum: 17) (Refresh)FirstPrevNext
GeneralCant MagicDocking do this already? Pinmemberleppie17:30 7 Jul '03  
GeneralRe: Cant MagicDocking do this already? PinsupporterPaul Selormey19:22 7 Jul '03  
GeneralRe: Cant MagicDocking do this already? Pinmemberleppie8:37 8 Jul '03  
GeneralRe: Cant MagicDocking do this already? PineditorHeath Stewart7:16 23 Jan '04  
GeneralRe: Cant MagicDocking do this already? PinmemberSuper Lloyd23:25 1 Dec '05  
GeneralRe: Cant MagicDocking do this already? PinsupporterPaul Selormey23:07 2 Dec '05  
GeneralRe: Cant MagicDocking do this already? PinmemberDiego Mijelshon3:18 8 Jul '03  
GeneralRe: Cant MagicDocking do this already? Pinmemberrahtrow3:46 8 Jul '03  
GeneralRe: Cant MagicDocking do this already? PinmemberDiego Mijelshon4:53 8 Jul '03  
GeneralRe: Cant MagicDocking do this already? Pinmemberfadi4:57 8 Jul '03  
GeneralRe: Cant MagicDocking do this already? Pinmemberleppie8:47 8 Jul '03  
GeneralRe: Cant MagicDocking do this already? Pinmemberfadi10:29 8 Jul '03  
GeneralRe: Cant MagicDocking do this already? PinmemberDiego Mijelshon18:45 22 Jul '03  
GeneralRe: Cant MagicDocking do this already? PinmemberTim Dawson23:39 8 Jul '03  
GeneralRe: Cant MagicDocking do this already? PinmemberSoliant5:24 8 Jul '03  
GeneralRe: Cant MagicDocking do this already? Pinmemberlee_connell18:31 8 Jul '03  
GeneralRe: Cant MagicDocking do this already? Pinmemberstefanos321:47 30 Nov '03  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 6 Jul 2003
Editor: Smitha Vijayan
Copyright 2003 by Iridar
Everything else Copyright © CodeProject, 1999-2009
Web21 | Advertise on the Code Project