Gasman
Enthusiastic Amateur
- Local time
- Today, 06:32
- Joined
- Sep 21, 2011
- Messages
- 15,708
This is mainly directed at @MajP as he seems to post the most about classes here, but would welcome input from anyone who creates their own classes.
If I wanted to create a very simple textbox class and let us say I just want to use it to have common code run on GotFocus and LostFocus, so as to identify to the user where they are on a form, what is the minimum code I would need to create in the class.
Would I just then loop through the controls and set the textbox to the textboxclass?
I will be honest, I suggested this method as a way to have common code for all the textboxes, which I have seen happen in some videos, but ther is plenty of other code there, and I want to start small. Then realised whilst I might know it can be done, I do not know exactly how to do it.
This is just for my own benefit and understanding, but would also help that member where I suggested this might be a way to do this. That member was on another site.
If I wanted to create a very simple textbox class and let us say I just want to use it to have common code run on GotFocus and LostFocus, so as to identify to the user where they are on a form, what is the minimum code I would need to create in the class.
Would I just then loop through the controls and set the textbox to the textboxclass?
I will be honest, I suggested this method as a way to have common code for all the textboxes, which I have seen happen in some videos, but ther is plenty of other code there, and I want to start small. Then realised whilst I might know it can be done, I do not know exactly how to do it.
This is just for my own benefit and understanding, but would also help that member where I suggested this might be a way to do this. That member was on another site.