Click here to Skip to main content
15,888,113 members
Home / Discussions / C#
   

C#

 
GeneralRe: Receiving Input from other processes/OS (aka Standard In) Pin
AJB...23-Sep-03 7:20
AJB...23-Sep-03 7:20 
GeneralRe: Receiving Input from other processes/OS (aka Standard In) Pin
Blake Coverett23-Sep-03 8:05
Blake Coverett23-Sep-03 8:05 
GeneralRe: Receiving Input from other processes/OS (aka Standard In) Pin
Heath Stewart23-Sep-03 8:47
protectorHeath Stewart23-Sep-03 8:47 
GeneralNewbie in C# Pin
Member 59611223-Sep-03 4:42
Member 59611223-Sep-03 4:42 
GeneralRe: Newbie in C# Pin
Heath Stewart23-Sep-03 6:02
protectorHeath Stewart23-Sep-03 6:02 
GeneralRe: Newbie in C# Pin
Michael P Butler23-Sep-03 6:44
Michael P Butler23-Sep-03 6:44 
GeneralSystem.UnauthorizedAccessException Pin
ich_bins23-Sep-03 4:29
ich_bins23-Sep-03 4:29 
GeneralControl Designer & Child Controls Issue Pin
scott@otech.com23-Sep-03 4:14
scott@otech.com23-Sep-03 4:14 
Does anyone have a solution to this problem:

When implementing a ControlDesigner or ParentControlDesigner, if one has a
UserControl that contains child controls as follows:

+========UserControl=========+
| +-----------------------------------+ |
| | Caption Panel | |
| +-----------------------------------+ |
| +---------------------------------- + |
| | Content Panel | |
| +-----------------------------------+ |
+=========================+

My desire is to have ToolboxItems that are added to the UserControl at
design-time be added as children of the ContentPanel.

- Using a ControlDesigner and invoking CreateComponent() adds the control to
the current design document (the UserControl).
- If one attempts to "re-parent" the control being "dropped" within the
designer for the UserControl by doing the following

Control target = ((myUserControl)this.Control).ContentPanel;
// the (child) Control where the dropped control should be moved-to

this.Control.Controls.RemoveAt(this.Control.Controls.IndexOf(ctl));
// remove the control from the UserControl (top-level parent)

ctl.Parent = target;
// assign the .Parent property of the control

target.Controls.Add(ctl);
// add the dropped control to the ContentPanel Controls collection

The error "Object reference not set to an instance of an object" occurs.

Do I need to create a(nother) designer for the ContentPanel so that IT can
serve as the target of the DragDrop? Is there some other (more expedient)
way to do this? Initiate an additional DesignerTransaction that makes the
re-parenting change? Making the .Parent and Controls[] change, and then
using the ComponentChangeService to make Changing/Changed notifications on
the "Parent" and "Controls" PropertyDescriptors ?
GeneralRe: Control Designer & Child Controls Issue Pin
Heath Stewart23-Sep-03 5:50
protectorHeath Stewart23-Sep-03 5:50 
GeneralRe: Control Designer & Child Controls Issue Pin
scott@otech.com23-Sep-03 6:20
scott@otech.com23-Sep-03 6:20 
GeneralRe: Control Designer & Child Controls Issue Pin
Heath Stewart23-Sep-03 6:47
protectorHeath Stewart23-Sep-03 6:47 
GeneralRe: Control Designer & Child Controls Issue Pin
scott@otech.com24-Sep-03 7:51
scott@otech.com24-Sep-03 7:51 
GeneralRe: Control Designer & Child Controls Issue Pin
Heath Stewart24-Sep-03 8:50
protectorHeath Stewart24-Sep-03 8:50 
GeneralRe: Control Designer & Child Controls Issue Pin
scott@otech.com24-Sep-03 9:02
scott@otech.com24-Sep-03 9:02 
Questioncopy constructor needed? Pin
berndg23-Sep-03 2:59
berndg23-Sep-03 2:59 
AnswerRe: copy constructor needed? Pin
Heath Stewart23-Sep-03 3:12
protectorHeath Stewart23-Sep-03 3:12 
GeneralRe: copy constructor needed? Pin
Alvaro Mendez23-Sep-03 4:43
Alvaro Mendez23-Sep-03 4:43 
GeneralRe: copy constructor needed? Pin
Heath Stewart23-Sep-03 5:39
protectorHeath Stewart23-Sep-03 5:39 
GeneralRe: copy constructor needed? Pin
Alvaro Mendez23-Sep-03 10:37
Alvaro Mendez23-Sep-03 10:37 
GeneralRe: copy constructor needed? Pin
Heath Stewart23-Sep-03 10:47
protectorHeath Stewart23-Sep-03 10:47 
GeneralRe: copy constructor needed? Pin
Alvaro Mendez23-Sep-03 11:01
Alvaro Mendez23-Sep-03 11:01 
GeneralRe: copy constructor needed? Pin
Heath Stewart23-Sep-03 13:04
protectorHeath Stewart23-Sep-03 13:04 
GeneralWebservice over SSL with multiple servers Pin
solidstore23-Sep-03 1:14
solidstore23-Sep-03 1:14 
GeneralRe: Webservice over SSL with multiple servers Pin
Heath Stewart23-Sep-03 3:25
protectorHeath Stewart23-Sep-03 3:25 
GeneralRe: Webservice over SSL with multiple servers Pin
solidstore23-Sep-03 3:54
solidstore23-Sep-03 3:54 

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.