Re: generic panel focus





On Nov 16, 1:05 pm, piratic...@xxxxxxxxx wrote:
woah. thanks, that's so simple... I didn't think that'd change the
panel cod for each specific one, since it has been assigned a name in
the procedure section, but it does. nice :)
thanks for the help... that will come in handy in the future..


That points up an issue of clarity in your code.

Although Delphi constructs a procedure named Panel1Enter the important
elements of the procedure are the parameter name & types.

Where a single event handler is used by many controls then it is
advisable to change the name in the object inspector's event name, to a
more appropriate one (I would suggest AnyPanelEnter()). Delphi will
then change the procedure name in your code and in the form's type
declaration.

It will then be obvious when that event handler is called.

Alan Lloyd

.



Relevant Pages

  • Re: Event Handler doesnt fire immediately upon postback?
    ... make its comparisons and work with the PostBack event handlers. ... It seems like such a waste of resources to me sometimes to use controls like ... I still prefer to do as much client-side processing as possible ... the event handler fires immediately. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Help me with threads.
    ... > controls from a worker thread, I disagree that dealing with this situation ... > public delegate void StringEventHandler(object worker, StringEventArgs e); ... > part, BeginInvoke needs a pointer to our event handler, plus an object ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Help me with threads.
    ... What you need to do is to define an event that your worker thread can throw ... when it needs to send data back to the UI thread, create an event handler to ... sure that you're in the correct thread before you update your UI controls. ... StringEventArgs e); ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Event Handler doesnt fire immediately upon postback?
    ... ASP.Net programming model, coming from Classic ASP, which is entirely ... Controls within Controls in the Page, which is, itself, a Control. ... previous state (prior to the PostBack), and only then does the Page (and ... the event handler fires immediately. ...
    (microsoft.public.dotnet.framework.aspnet)
  • MethodInfo.Invoke on unknown method of ActiveX control at runtime
    ... I have a bunch of ActiveX/OCX controls which I have run through AxImp to ... __GridDisplay_LaunchApplicationEventHandler(object object, IntPtr method) ... I got the above information from Reflection API on MyControl, ... an instance of the event handler which I will not know until runtime. ...
    (microsoft.public.dotnet.framework.interop)