Geeks With Blogs
Adrian Hara Working through the .NET maze December 2006 Entries
Windows Forms Designer: dragging/dropping child controls
I ran into a bit of a problem yesterday, when trying to implement a control designer (derived from ParentControlDesigner) for a Windows Forms control derived from GroupBox, which should only hold a certain kind of control as children (say CheckBoxes). So I thought I'd just override the designer's OnDragDrop method, check if the dropped control is a CheckBox and I'd be all set, something like: if (de.Data.GetDataPresent(Dat... ) { CheckBox checkbox = de.Data.GetData(DataFormats... ......

Posted On Thursday, December 7, 2006 9:24 AM

Copyright © Adrian Hara | Powered by: