Click here to Skip to main content
15,912,400 members
Home / Discussions / C#
   

C#

 
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 
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 
I've tried that. This is the code I've got. Perhaps I'm doing something wrong...

<br />
  Public NotInheritable Class XPanderDesigner<br />
        Inherits System.Windows.Forms.Design.ParentControlDesigner<br />
<br />
        Private m_BorderPen As New Pen(Color.FromKnownColor(KnownColor.ControlDarkDark))<br />
        Private m_XPander As XPander<br />
        Private WithEvents m_ICCService As IComponentChangeService<br />
<br />
        Public Sub New()<br />
            m_BorderPen.DashStyle = Drawing.Drawing2D.DashStyle.Dash<br />
        End Sub<br />
<br />
        Public Overrides Sub Initialize(ByVal component As System.ComponentModel.IComponent)<br />
            MyBase.Initialize(component)<br />
            m_XPander = CType(Me.Control, XPander)<br />
        End Sub<br />
<br />
        Protected Overrides Sub OnPaintAdornments(ByVal pe As PaintEventArgs)<br />
            MyBase.OnPaintAdornments(pe)<br />
            pe.Graphics.DrawRectangle(m_BorderPen, 0, 0, m_XPander.Width - 2, m_XPander.Height - 2)<br />
<br />
        End Sub<br />
<br />
        Private Sub m_ICCSerivce_ComponentAdding(ByVal sender As Object, ByVal e As System.ComponentModel.Design.ComponentEventArgs) Handles m_ICCService.ComponentAdding<br />
            Dim b As XPanderLinkLabel<br />
<br />
            '            If TypeOf (e.Component) Is XPanderLinkLabel Then<br />
            m_ICCService.OnComponentChanging(m_XPander, Nothing)<br />
            m_ICCService.OnComponentChanging(m_XPander.pnlLinks, Nothing)<br />
            e.Component.Site = CType(m_XPander.pnlLinks, ISite)<br />
            m_XPander.pnlLinks.Controls.Add(DirectCast(e.Component, XPanderLinkLabel))<br />
            m_ICCService.OnComponentChanged(m_XPander.pnlLinks, Nothing, Nothing, Nothing)<br />
            m_ICCService.OnComponentChanged(m_XPander, Nothing, Nothing, Nothing)<br />
<br />
            '           End If<br />
        End Sub<br />
    End Class<br />


pnlLinks is the internal child control of the main user control m_Xpander that I want to be the true parent of the controls dropped onto the XPander. When I drag & drop in designmode with this code it parents the controls to the XPander, and not the internal panel of the xpander.
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 
GeneralRe: Webservice over SSL with multiple servers Pin
Heath Stewart23-Sep-03 4:34
protectorHeath Stewart23-Sep-03 4:34 
GeneralRe: Webservice over SSL with multiple servers Pin
Heath Stewart23-Sep-03 4:36
protectorHeath Stewart23-Sep-03 4:36 
GeneralNamed Mutex (I think) Pin
James Simpson23-Sep-03 0:52
James Simpson23-Sep-03 0:52 
GeneralRe: Named Mutex (I think) Pin
Heath Stewart23-Sep-03 3:31
protectorHeath Stewart23-Sep-03 3:31 
GeneralRe: Named Mutex (I think) Pin
Blake Coverett23-Sep-03 6:14
Blake Coverett23-Sep-03 6:14 
Generalaspnet_wp.exe restarting unexpectedly Pin
solidstore22-Sep-03 23:52
solidstore22-Sep-03 23:52 

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.