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

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

149 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
Posts: 370
Registered: ‎05-06-2012
Message 2 of 2 (138 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 ?

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!