Re: isDirty



That is an interesting idea.
Microsoft already has a property for that.It is called Modified.
That flags works well unless I reformat what the operator entered.
myPhone.text = PhoneFormat(myPhone.text) will loose the proper value of the
Modified property.
--
Arne Garvander
Certified Geek
Professional Data Dude


"Jediah L" wrote:

Subclass your textboxes, create a property called IsDirty, set the property
to True the first time the text change event is fired (you could even make
it a little smarter by recording the default value, to compare to see if the
value was changed back to the default and then set the IsDirty flag to
false).

Then, either keep a collection at the form level of all these textboxes so
you can enumerate them quite seemlessly, and check the IsDirty property in
succession on each control, or just enumerate all controls on the form and
check for a control of type equal to your text box subclass (the former is
more efficient), and check the IsDirty property.


Jediah L.


"Arne Garvander" <ArneGarvander@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:69C09BAE-BD8D-4BA6-AA4B-F4B84687B7DF@xxxxxxxxxxxxxxxx
That does not work for me.
I need to check up on the whole form when they click the save button.
--
Arne Garvander
Certified Geek
Professional Data Dude


"TAB" wrote:

Hi

You could use the TextChanged Event, add an eventhandler and you get all
changes in the textbox.


"Arne Garvander" <ArneGarvander@xxxxxxxxxxxxxxxxxxxxxxxxx> skrev i
meddelandet news:6DAE3C12-7990-4449-BBF4-29F825023BAF@xxxxxxxxxxxxxxxx
I use the text to preset a default value, so that idea does not work for
me.
There is a modified property that I can use, but it is not reliable.

--
Arne Garvander
Certified Geek
Professional Data Dude


"Scott M." wrote:

Yes, the text property. If it's not equal to an empty string (<> "")
it
has
data in it. Or you can look at the length property to see if it has a
length of zero (indicating it's empty).

-Scott


"Arne Garvander" <ArneGarvander@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message
news:57127D7A-432A-4444-A517-DBFC556C5A72@xxxxxxxxxxxxxxxx
Does a windows textbox have a property that tells if the user has
entered
anything into a textbox on a windows.
--
Arne Garvander
Certified Geek
Professional Data Dude








.