Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TabPage
Message
General information
Forum:
ASP.NET
Category:
Forms
Title:
Miscellaneous
Thread ID:
00929157
Message ID:
00929299
Views:
11
I am creating a set of custom user controls and I am inplementing a resize feature into all my controls so that when the form is resized all the controls are resized appropriately. In order to avoid passing of a parameters I store some initial values in each control (like InitSize, ParentInitSize, etc.). Right now the initilazation of these peroperties are in OnCreateControl but the user could very well have resized the form before activating the other TabPages. So when the tabpage is activated after a form resize has occured the tabpage thinks that it's initial properties should be what they are after form resize.

Right now I have some code that goes through all tabpages on a tabcontrol in the tabcontrol's OnCreateControl and initalizes each tabpage, but I was hoping I wouldn't have to do this

Einar

>>>only fires for the first TabPage and doesn't fires for any consecutive TabPages until the other TabPages are clicked (activated).
>
>It is a comprehensive behavior. Why would you want to initialize something that is not visible and may never become visible if the user never select the second tabpage?
>
>
>>Thanks for the reply Eric, but no it doesn't seem to help me at all.
>>
>>Einar
>>>Can the BindingContextChanged event help you?
>>>
>>>
>>>>Is there an event that fires when the form is initially created for the TabPage? I am creating some custom controls and I have been using OnCreateControl for several other controls but it seems that OnCreateControl only fires for the first TabPage and doesn't fires for any consecutive TabPages until the other TabPages are clicked (activated).
>>>>
>>>>Einar
Semper ubi sub ubi.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform