.NET

.NET

Reply
Valued Contributor
kcimos
Posts: 91
Registered: ‎02-18-2010
Message 1 of 2 (140 Views)

general vb.net - custom controls or other ways of handling similar data

140 Views, 1 Replies
07-31-2012 03:21 PM

I'm developing a routine that uses a windows form to gather data from the user. For a lot of this I need info for the Left side & the Right side. I have pretty much finished writing the code to take care of the Right side. I have 40 properties now all with "Right" in their names in anticipation of needing corresponding "Left" ones. I have numerous textboxes, checkboxes, & radiobottons on the form along with various input validation methods used to set these 40 properties.

 

I could just copy all of this code & replace "Right" with "Left", but there are about 500 lines of code (hard to tell since I use a lot of white space), and that seems rather inefficient, especially if something needs to change.

 

I'm starting to think that maybe I should develop this into one custom control that could be used for botth sides. This would be new territory for me, so I was wondering if anyone had any insight on this or alternative ways of dealing 40 right properties & 40 left properties and all that goes behind making those properties work.

Valued Mentor
DiningPhilosopher
Posts: 370
Registered: ‎05-06-2012
Message 2 of 2 (129 Views)

Re: general vb.net - custom controls or other ways of handling similar data

07-31-2012 08:03 PM in reply to: kcimos

Have you considered using a PropertyGrid ?

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.