Thanks Phil,
re:
But if all EditFields in all Windows of this
application will have the same behavior, then using Extends is a fine
way to handle this function.
What about if there is only one window and only some (30) editfields?
Lennox.
Phil M <[EMAIL PROTECTED]> wrote: On Aug 10, 2006, at 11:36 PM, Christian
Miller wrote:
>> Well, not exactly as Christian described it. If you make the method
>> Protected, you can't call it by saying EF1.SetupColor, you have to
>> call it
>> this way: Extensions.EF1.SetupColor
>
> Yes, yes. My bad, sorry. It needs to be in a module with global
> scope.
Personally, I would never make this function into an Extends method.
Extends are suppose to be methods that you would use all of the
time... for example, an Extends method which changes all of the text
to Red is a generic enough function to benefit from Extends.
Since this method appears to only be useful in the Window the
specific Editfields are located, I think this method is too specific
to use Extends. But if all EditFields in all Windows of this
application will have the same behavior, then using Extends is a fine
way to handle this function.
The other option is to create an EditField subclass, and enter the
code in the "LostFocus" or the "TextChange" event. This would make
the background color automatic based on user response without
requiring code in the Window.
_______________________________________________
Unsubscribe or switch delivery mode:
Search the archives of this list here:
---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates
starting at 1ยข/min.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>