1

Hi,

My first post, please be gentle.

I have 64 booleans - all must be displayed on a single screen as a series of checkboxes (no - I don't care about the 65th bool, yes - it must be a single no-scroll screen on the UI).

As a VBA-refugee, I would love to use a control array, but VS2008 doesn't like the idea.

The data I will have sitting on the server gives me the 4 "titles" for each of the groups of 16 bools, the text for each of the checkbox labels, and the current bool value for each checkbox. I can massage this data into any suitable form.

So my question: what's the best (?? cleanest, neatest, most-elegant, most-maintainable ??) way to get an array of strings and an array of booleans onto a form full of checkboxes, and to harvest the booleans after edit? This only takes half a dozen lines of code in VBA but I'm struggling to force it into VB.NET

Any general pointers?

izy

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by izyrider
1

>I would love to use a control array, but VS2008 doesn't like the idea.

VB.NET has better approach than VBA. You may create an array of object (or Generic List, even a better way than array) of CheckBox class.

>what's the best (?? cleanest, neatest, most-elegant, most-maintainable ??)

CheckBoxList control.

1

Thanks adatapost.

I spent a pleasant couple of hours playing with DataGridViews and then with CheckListBoxes - the CheckListBox wins easily for sticking the data up on the screen. Harvesting user-edits seems to require a dictionary (PK:textDescription) but is not an issue.

Thanks, izy

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.