Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to set up a control after siting is complete?
Message
From
19/02/2007 11:07:51
 
 
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
C# 2.0
OS:
Windows 2000 SP4
Miscellaneous
Thread ID:
01196991
Message ID:
01197048
Views:
16
This message has been marked as the solution to the initial question of the thread.
Viv,

Have you tried the OnCreateControl event?

~~Bonnie



>Hi,
>
>I have a class derived from the Panel control that is used on several forms. Currently this class creates its own Toolstrip in its constructor.
>
>Now there is a requirement for the toolstrip content to vary (slightly) depending on which form it is sited on so I've added a couple of public properties to the panel to control the toolstrip creation (intending to set these at design time in each form)
>
>Obviously the toolstrip creation can now longer be handled by the constructor but I can find no other obvious panel event to use. I thought ParentChanged() might work but this fires when the control is added to the form and the auto-generated code does this before initializing the properties.
>
>Any suggestions on how to do this (I really don't want to have to explicitly call a panel function from the containing form)
>
>TIA,
>Viv
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform