R
Richard Brown
Ok, I've been looking through the .NET SDK docs and stuff.
I'm wondering if you can provide a control extender that does generic
validation or functionality just by dropping it on the form. For instance,
using the IExtenderProvider interface, you can specify properties, but there
is nothing documented about linking into a control's events.
For instance, in my application, there are specific formatting,
functionality and validation for all text boxes based on a couple of
property settings. Some of these text boxes have additional validation that
must be handled per control.
So, I want all my textboxes to automatically select all text when they get
tabbed into, on leaving, I want some generic special formatting applied
according to the property setting (if the data entered is in error,
automatically set the error provider to the error text (ie, invalid date,
invalid number, etc)). Some of this functionality (say allowing the
enter-key to move between fields).
Are we able to write an Extender control to do all of this in a generic
sense, intercept or handle certain control events, and still chain to the
normal control events? This would save a *ton* of coding, basically, just
drop the extender control on a form and set some fields and your entire
application has the same 'look-feel-functionality', and a common set of code
to adjust that without having to touch everything.
Reading a little more in the documentation, the ToolTop class seems to do
this, it pops up a tooltip if you hover over the control, but I can't see
any docs on how this is actually done.
I'm wondering if you can provide a control extender that does generic
validation or functionality just by dropping it on the form. For instance,
using the IExtenderProvider interface, you can specify properties, but there
is nothing documented about linking into a control's events.
For instance, in my application, there are specific formatting,
functionality and validation for all text boxes based on a couple of
property settings. Some of these text boxes have additional validation that
must be handled per control.
So, I want all my textboxes to automatically select all text when they get
tabbed into, on leaving, I want some generic special formatting applied
according to the property setting (if the data entered is in error,
automatically set the error provider to the error text (ie, invalid date,
invalid number, etc)). Some of this functionality (say allowing the
enter-key to move between fields).
Are we able to write an Extender control to do all of this in a generic
sense, intercept or handle certain control events, and still chain to the
normal control events? This would save a *ton* of coding, basically, just
drop the extender control on a form and set some fields and your entire
application has the same 'look-feel-functionality', and a common set of code
to adjust that without having to touch everything.
Reading a little more in the documentation, the ToolTop class seems to do
this, it pops up a tooltip if you hover over the control, but I can't see
any docs on how this is actually done.