Click here to Skip to main content
16,020,714 members
Home / Discussions / Windows Forms
   

Windows Forms

 
Questionhow to use the expandable and collapsable property Pin
honey.rpk29-Jun-09 0:36
honey.rpk29-Jun-09 0:36 
AnswerRe: how to use the expandable and collapsable property Pin
DoctorMick29-Jun-09 5:37
DoctorMick29-Jun-09 5:37 
AnswerRe: how to use the expandable and collapsable property Pin
Rob Smiley30-Jun-09 11:49
Rob Smiley30-Jun-09 11:49 
QuestionHow to make a control as a child to user control but not for a form? Pin
honey.rpk28-Jun-09 21:11
honey.rpk28-Jun-09 21:11 
AnswerRe: How to make a control as a child to user control but not for a form? [modified] Pin
BillWoodruff28-Jun-09 23:20
professionalBillWoodruff28-Jun-09 23:20 
AnswerRe: How to make a control as a child to user control but not for a form? Pin
dan!sh 29-Jun-09 0:03
professional dan!sh 29-Jun-09 0:03 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
honey.rpk29-Jun-09 0:57
honey.rpk29-Jun-09 0:57 
GeneralRe: How to make a control as a child to user control but not for a form? [modified] Pin
BillWoodruff29-Jun-09 2:30
professionalBillWoodruff29-Jun-09 2:30 
Hi d#@nish,

Actually that article (using VB.NET) does not contain a solution to the problem the user describes.

By the way : the declaration in VB syntax in that article :

<Designer("System.Windows.Forms.Design.ParentControlDesigner, _
   System.Design", GetType(IDesigner))>


Is identical in function to the attribute in C# :

[Designer("System.Windows.Forms.Design.ParentControlDesigner, System.Design",  typeof(IDesigner))]


Which the questioner has already found.

The problem described is not getting one usercontrol itself to function to "capture" other controls dragged and dropped onto it at design-time, but to deal with the question where you have one usercontrol that contains other controls that normally capture other controls (like Panels, or TableLayoutPanels).

You create a UserControl, place a Panel on it, then place the UserControl on a Form at design-time, and ONLY the UserControl will capture controls dragged on to it

Unfortunately creating another UserControl #2 (or creating a Control that derives from something like 'Panel) with the same IDesigner inheritance, and placing it at design-time on UserControl #1, and then placing UserControl #1 on a Form does NOT allow you to have UserControl #2 capture controls.

I've also tried over-riding the 'ControlAdded Event of UserControl #1 using 'OnControlAdded, which will fire at design-time, and assigning the "incoming control" to its hosted UserControl #2 : no dice there, either.

But the fact that I have tried these several experiments, does not lead me to conclude that the problem cannot be solved Smile | :)

best, Bill

"Many : not conversant with mathematical studies, imagine that because it [the Analytical Engine] is to give results in numerical notation, its processes must consequently be arithmetical, numerical, rather than algebraical and analytical. This is an error. The engine can arrange and combine numerical quantities as if they were letters or any other general symbols; and it fact it might bring out its results in algebraical notation, were provisions made accordingly." Ada, Countess Lovelace, 1844

modified on Monday, June 29, 2009 5:56 PM

GeneralRe: How to make a control as a child to user control but not for a form? Pin
dan!sh 29-Jun-09 2:47
professional dan!sh 29-Jun-09 2:47 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
BillWoodruff29-Jun-09 3:38
professionalBillWoodruff29-Jun-09 3:38 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
dan!sh 29-Jun-09 6:51
professional dan!sh 29-Jun-09 6:51 
AnswerRe: How to make a control as a child to user control but not for a form? Pin
Henry Minute29-Jun-09 6:23
Henry Minute29-Jun-09 6:23 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
honey.rpk29-Jun-09 19:01
honey.rpk29-Jun-09 19:01 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
Henry Minute29-Jun-09 23:29
Henry Minute29-Jun-09 23:29 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
honey.rpk29-Jun-09 23:57
honey.rpk29-Jun-09 23:57 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
Henry Minute30-Jun-09 0:34
Henry Minute30-Jun-09 0:34 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
honey.rpk30-Jun-09 0:58
honey.rpk30-Jun-09 0:58 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
Henry Minute30-Jun-09 1:08
Henry Minute30-Jun-09 1:08 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
Henry Minute30-Jun-09 1:22
Henry Minute30-Jun-09 1:22 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
honey.rpk30-Jun-09 2:30
honey.rpk30-Jun-09 2:30 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
Henry Minute30-Jun-09 5:51
Henry Minute30-Jun-09 5:51 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
ice.cool 172930-Jun-09 20:23
ice.cool 172930-Jun-09 20:23 
GeneralRe: How to make a control as a child to user control but not for a form? [modified] Pin
Henry Minute30-Jun-09 6:26
Henry Minute30-Jun-09 6:26 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
dan!sh 30-Jun-09 6:39
professional dan!sh 30-Jun-09 6:39 
GeneralRe: How to make a control as a child to user control but not for a form? Pin
Henry Minute30-Jun-09 8:20
Henry Minute30-Jun-09 8:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.