RE: TreeView multiple selections
- From: Li Weng <wlwlwlwl@xxxxxxxxxxxxxxxx>
- Date: Wed, 31 Oct 2007 06:11:00 -0700
Hi, Jeffrey:
Thanks for your message.
Basically we share the same point now. Just want to make some side notes:
(Feel free to not continue this discussion if you don't want to)
1) Design order: OnXXX->XXX->OnYYY->YYY.
The problem is when we customize a control, we don't know XXX or YYY. We
implement OnXXX and OnYYY. Then we give this customized control to other
developers. They will use it in various app and implement different XXX. They
don't care what is in OnYYY. We don't want them to check OnYYY before they
design their XXX. And in some cases they can't even see the OnYYY (it is by a
..dll).
2) Place them in the constructor of the control class.
In some cases we still need an event to implement something. For instance,
we need a click event to implement multiple selection. If users do nothing,
nothing happens. In this case a constructor will not do.
3) My thinking is that basically it is not safe to use On*** events to
customize a control. You never know how other developers fire their app
events. Just like what you said, the design should base on
OnXXX->XXX->OnYYY->YYY. But when we base on XXX/YYY, it is not a customized
control. It is a case by case design. We may just better off move OnXXX's
codes to XXX to make it more straightforward.
I didn't say we cannot do it in an app. What I said is we can't customize it
in this way.
Thanks.
Li
""Jeffrey Tan[MSFT]"" wrote:
Hi Li,.
Thanks for your detailed explanation!
Ok, I see your key concern now. However, there is no design spec or
document stating that "all customizing codes should run before any app's
codes". There is no guarantee for this, so you should not take this as
assumption. Actually, events are not magic; it is always the OnXXX method
internally fires the XXX event. So the control events order are always
OnXXX->XXX->OnYYY->YYY. You'd better use this design order instead of that
assumption.
If you wanted that your code is fired very early, maybe you should place
them in the constructor of the control class. Thanks.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
- References:
- RE: TreeView multiple selections
- From: "Jeffrey Tan[MSFT]"
- RE: TreeView multiple selections
- From: "Jeffrey Tan[MSFT]"
- RE: TreeView multiple selections
- From: "Jeffrey Tan[MSFT]"
- RE: TreeView multiple selections
- From: Li Weng
- RE: TreeView multiple selections
- From: "Jeffrey Tan[MSFT]"
- RE: TreeView multiple selections
- From: Li Weng
- RE: TreeView multiple selections
- From: "Jeffrey Tan[MSFT]"
- RE: TreeView multiple selections
- From: Li Weng
- RE: TreeView multiple selections
- From: "Jeffrey Tan[MSFT]"
- RE: TreeView multiple selections
- From: Li Weng
- RE: TreeView multiple selections
- From: "Jeffrey Tan[MSFT]"
- RE: TreeView multiple selections
- From: Li Weng
- RE: TreeView multiple selections
- From: "Jeffrey Tan[MSFT]"
- RE: TreeView multiple selections
- From: Li Weng
- RE: TreeView multiple selections
- From: "Jeffrey Tan[MSFT]"
- RE: TreeView multiple selections
- Prev by Date: Re: How do I get Crystal Reports to work in the Server?
- Next by Date: Re: Missing many HTML properties in design time
- Previous by thread: RE: TreeView multiple selections
- Next by thread: RE: TreeView multiple selections
- Index(es):
Relevant Pages
|