Click to See Complete Forum and Search --> : VB.net control array setuo problem


Asad_Falleni
May 8th, 2010, 05:41 PM
Hi, I need to unfortunately take up some of your valuable time. My brothers and I are trying to use Visual Sutudio 2008 -VB.net with Access 2007 to write a small program to help with managing our family business. It is to track the movement of machines and machine tools from various sites to other sites. I have a question in the Database forum but no one has had time to resond to it yet, so I wait maybe for answer to come, yes.

I have some experience with VB6 and it was easy to do a control array for radio buttons such that btnSMP(0) and btnSMP(1) and btnSMP(2) were together and if user clicked on btnSMP(1) it was shown with the blck dot on it as selected. If one then changed mind (which seems to be a very common thing) then if user clicked on btnSMP(0) then it was selected and the other one was not.

That is not possible in Visual Studio 2008 for what ever reason the higher ups decided. I have read a number of articles now in MSDN about how to duplicate that feature in VB.net code but it seems to be a lot of work and they add in many features I do not have a need of.

Our problem is that we have on our form 35 items all of which need a button to select one of 3 grades: btnSMP(0)-GOOD and btnSMP(1) -USED and btnSMP(2)- JUNK.

As the moderator says to make sure that I ask a question than here it is:

According to the MSDN article:
http://msdn.microsoft.com/en-us/library/aa289500(VS.71).aspx
do we have to create 35 separate ButtonArray classes one for each of the types of material being graded?

I am not wishing to add, or remove buttons just when every one of the possible 35 types of materials is being graded that the user can select or deselct and select another grade. On any one form the user may select from 1 to all 35 types of materials to grade, but often more than not the average is 10 - 13 items.

Certainly is an easier way available? Please show me another article than from what I am finding in MSDN or on google with "VB.net control array" Many many of them to read through to find maybe what it is I am in need of.

Thank you in ahead of time for your response

Asad

Asad_Falleni
May 8th, 2010, 05:42 PM
Hi, I need to unfortunately take up some of your valuable time. My brothers and I are trying to use Visual Sutudio 2008 -VB.net with Access 2007 to write a small program to help with managing our family business. It is to track the movement of machines and machine tools from various sites to other sites. I have a question in the Database forum but no one has had time to resond to it yet, so I wait maybe for answer to come, yes.

I have some experience with VB6 and it was easy to do a control array for radio buttons such that btnSMP(0) and btnSMP(1) and btnSMP(2) were together and if user clicked on btnSMP(1) it was shown with the blck dot on it as selected. If one then changed mind (which seems to be a very common thing) then if user clicked on btnSMP(0) then it was selected and the other one was not.

That is not possible in Visual Studio 2008 for what ever reason the higher ups decided. I have read a number of articles now in MSDN about how to duplicate that feature in VB.net code but it seems to be a lot of work and they add in many features I do not have a need of.

Our problem is that we have on our form 35 items all of which need a button to select one of 3 grades: btnSMP(0)-GOOD and btnSMP(1) -USED and btnSMP(2)- JUNK.

As the moderator says to make sure that I ask a question than here it is:

According to the MSDN article:
http://msdn.microsoft.com/en-us/library/aa289500(VS.71).aspx
do we have to create 35 separate ButtonArray classes one for each of the types of material being graded?

I am not wishing to add, or remove buttons just when every one of the possible 35 types of materials is being graded that the user can select or deselct and select another grade. On any one form the user may select from 1 to all 35 types of materials to grade, but often more than not the average is 10 - 13 items.

Certainly is an easier way available? Please show me another article than from what I am finding in MSDN or on google with "VB.net control array" Many many of them to read through to find maybe what it is I am in need of.

Thank you in ahead of time for your response

Asad

DataMiser
May 8th, 2010, 06:49 PM
Do you really even need a control array to do this?

If I am not mistaken radio buttons are normally grouped within a frame or other containter and only one can be selected at a time within that container. Control array allows you to code it a bit differently but you should be able to get the result you need without an array.

dglienna
May 9th, 2010, 12:29 PM
If not, just CREATE a Frame around the buttons that have only one sensible option. The Frame will only let one be selected.

HanneSThEGreaT
May 10th, 2010, 09:23 AM
Hello.

Do all 35 items have the same values to be selected?

For example. You have 35 different items. But all 35 things have a setting of either of these :

btnSMP(0)-GOOD and btnSMP(1) -USED and btnSMP(2)- JUNK.

?

If it is so, there is indeed an easier way :)

HanneSThEGreaT
May 10th, 2010, 09:31 AM
[ Merged ]