T
Tom
I am writing a Visual basic .Net database application.
There are many forms that first let you select and look at
a DB record and then when you click a "modify" button you
are allowed to change data in the text boxes. Then
an "update" button saves the data back to the database.
What is the best way to change several properties on most
of the textbox controls on the form when the "modify"
button is clicked? (e.g. make them editible (and hence not
grayed out.) Should the click event for modify loop
through all the controls on the form doing it manually or
is there a way to just have the modify button change a
public variable and have each text box use it to change
itself? (Note that I have already made my own version of
a textbox so it is easy to add a bit of extra code to it.)
As I have many forms, I am interested in doing this
the "right" way to minimize maintenance and spaghetti code.
Thanks
There are many forms that first let you select and look at
a DB record and then when you click a "modify" button you
are allowed to change data in the text boxes. Then
an "update" button saves the data back to the database.
What is the best way to change several properties on most
of the textbox controls on the form when the "modify"
button is clicked? (e.g. make them editible (and hence not
grayed out.) Should the click event for modify loop
through all the controls on the form doing it manually or
is there a way to just have the modify button change a
public variable and have each text box use it to change
itself? (Note that I have already made my own version of
a textbox so it is easy to add a bit of extra code to it.)
As I have many forms, I am interested in doing this
the "right" way to minimize maintenance and spaghetti code.
Thanks