Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How Do I Call OnResize() ?
Message
From
17/07/2009 08:57:04
John Baird
Coatesville, Pennsylvania, United States
 
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01412846
Message ID:
01412945
Views:
42
>>>I have a usercontrol, and internally I'm changing it's size. I then have:
>>>
>>>
>>>        protected override void OnResize(EventArgs e)
>>>        {
>>>            // My code here
>>>
>>>            base.OnResize(e);
>>>        }
>>>
>>>
>>>What event args is it expecting?
>>
>>You usually have object Sender and EventArgs (of some kind) e. These arguments are provided to you by the event system and should be prefilled. If you want to create your own you can.
>
>Actually the Reszie event passes object and Eventargs parameters - the OnResize() method only receives the Eventargs (the 'sender' obviously being the class itself). But to Kevin's question 'What event args is it expecting?' the answer is just an instance of the Eventargs class - which doesn't contain any embedded info so can be called with OnResize(new Eventargs()) or just OnResize(null)


I know that, I was trying to figure out what Kevin was asking. You don't want to make a new set of event args and pass to the base handler.
Previous
Reply
Map
View

Click here to load this message in the networking platform