RE: TreeView multiple selections

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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.



.



Relevant Pages

  • Re: Web Form/SQL Table Structure
    ... So the Repeater tool output would look something like this: ... How would I call the correct control for the question (DropDownList, ... Microsoft MSDN Online Support Lead ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: ContextMenuStrip and PreviewKeyDown
    ... Win32 control message model and input model. ... System.Windows.Forms.ContextMenuStrip class to "MyContextMenuStrip" class ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: ObjectList Data-Binding to a List
    ... All I want is a control that allows me to manually build HTML ... Thanks for getting back to me about all these posts. ... Microsoft MSDN Online Support Lead ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: How can I get a bitmap into a WebControl?
    ... You currently have a WinForm control that can show image which is ... properties and generate a resource url which uses a custom http handler to ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: trouble decoding managed call stack causing kernel complaint
    ... verbose symbol loading. ... you may use spy++ to find out that control. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.win32.programmer.kernel)