Erik Porter's ControlArray
I had a need to set the dirty bit for a user control or form and I started looking for a common event that all controls shared like "Changed" or "Modified". Not having found such a thing, I started searching and I came across Erik Porter's ControlArray (for which he was selected Code Hero BTW). Now I had to make some modifications to his control (and port it over to C# because my VB.NET skills are non-existent) but the end result was I had a component that fit my needs with room to grow!
I changed the following:
- Ported to C# (due to my own ignorance...)
- Added a "Modified" Event
- Changed specific events (like TextChanged) to raise this new Modified Event.
- Looked for specific controls (like ListView) and added those specific events to the control.
- TODO: Dynamically add all controls on a Form to the ControlArray.
- TODO: Add support for more specific events raised by controls that inherit from Windows.Forms.Control.
controlArray = new ControlArray();
controlArray.Controls.Add(this.textBox3);
controlArray.Controls.Add(this.checkBox1);
controlArray.Controls.Add(this.listView1);
controlArray.Modified += new EventHandler(this.ControlArray_Changed);
Very Cool. Thanks Erik!
p.s. I will try to get my bits posted after I get a chance to work on it this weekend. I am still having a little problem getting some of the VB.NET code to work after porting over. The functionality works but the “Right Click“ support in designer is still broken...
www.WindowsForms.NET has made me the new Code Hero for my ControlArray that I've mentioned before.
Thanks WindowsForms Team!
Recent Posts
- Understanding API First Strategy and Benefits
- Frankenstein APIs Explained! - API Cyber Security Series
- API Security 101 - Cyber Security Explained
- API Trends 2022 - API Security and Cybersecurity
- API Trends 2022 - Seamless Integration Solutions
- API Trends 2022 - Adaptive API Management
- API Trends 2022 - API Integration Automation
- API Trends 2022 - Industry Specific Breakouts
- API Trends 2022 - API Best Practices
- API Trends 2022 - Open API Standards
- API Trends 2022 - API Integration Experience
- API Trends 2022 - API-Led Modernization
- API Trends 2022 - API Economy Growth
- Brenton House - Give your App and APIs a Turbo Boost – Part 2
- Easily Enable Speech Recognition in Titanium iOS using Hyperloop
Tag Cloud
- .NET
- adaptive api management
- android
- api
- api automation
- api best practices
- api economy
- api experience
- api first
- api integration
- api integrations
- api management
- api security
- api standards
- api strategy
- api trends
- apis
- appcelerator
- automation
- boot
- Brenton House
- C#
- Cisco VPN
- Cloud
- Community News
- Continuous Integration
- crash
- cybersecurity
- Dropbox
- fhir apis
- Free Stuff
- General Software Development
- Google Drive
- graphql
- healthcare apis
- houserules
- hyperloop
- ios
- json schema
- Live Mesh
- Mac OS X
- Microsoft
- mobile
- mobile api
- native
- open banking
- openapi
- Other Stuff
- SkyDrive
- speech
- Stuff
- swagger
- Team Systems
- titanium native
- titanium turbo
- Unit Testing
- Vista
- Visual Studio
- Visual Studio 11
- voice
- win7
- Windows 7
- Windows 8
- windows update