473,587 Members | 2,516 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CheckedState question

Below we can get the checkedItems within a checkedListBox but I have
attempted to find the unchecked items but I cannot seem to find a method. Is
there one or can I somehow manipulate the below code to find the uncChecked
items?

Dim ItemtoSet As New ArrayList

For Each CheckedItem As Object In ChkListBoxRouti nes.CheckedItem s
ItemtoSet.Add(C heckedItem)
Next
Nov 21 '05 #1
8 1408
"marcmc" <ma****@discuss ions.microsoft. com> schrieb
Below we can get the checkedItems within a checkedListBox but I have
attempted to find the unchecked items but I cannot seem to find a
method. Is there one or can I somehow manipulate the below code to
find the uncChecked items?

Dim ItemtoSet As New ArrayList

For Each CheckedItem As Object In ChkListBoxRouti nes.CheckedItem s
ItemtoSet.Add(C heckedItem)
Next


for i as integer=0 to ChkListBoxRouti nes.items.count-1
if not ChkListBoxRouti nes.getitemchec ked(i) then
...
end if
next i
Armin
Nov 21 '05 #2
that looks good Armin. Thankyou.
How though can i see what is in the array?

Nov 21 '05 #3
ignore that last post Armin, you're code is perfect. Thankyou very much for
your help
marc

"Armin Zingler" wrote:
"marcmc" <ma****@discuss ions.microsoft. com> schrieb
Below we can get the checkedItems within a checkedListBox but I have
attempted to find the unchecked items but I cannot seem to find a
method. Is there one or can I somehow manipulate the below code to
find the uncChecked items?

Dim ItemtoSet As New ArrayList

For Each CheckedItem As Object In ChkListBoxRouti nes.CheckedItem s
ItemtoSet.Add(C heckedItem)
Next


for i as integer=0 to ChkListBoxRouti nes.items.count-1
if not ChkListBoxRouti nes.getitemchec ked(i) then
...
end if
next i
Armin

Nov 21 '05 #4
I have written... but it still seems to be adding the checked items to the
array!!

For UnCheckedItem As Integer = 0 To ChkListBoxRouti nes.Items.Count - 1
If Not ChkListBoxRouti nes.GetItemChec ked(UnCheckedIt em) Then
ItemtoSet1.Add( UnCheckedItem)
End If
Next UnCheckedItem

"Armin Zingler" wrote:
"marcmc" <ma****@discuss ions.microsoft. com> schrieb
Below we can get the checkedItems within a checkedListBox but I have
attempted to find the unchecked items but I cannot seem to find a
method. Is there one or can I somehow manipulate the below code to
find the uncChecked items?

Dim ItemtoSet As New ArrayList

For Each CheckedItem As Object In ChkListBoxRouti nes.CheckedItem s
ItemtoSet.Add(C heckedItem)
Next


for i as integer=0 to ChkListBoxRouti nes.items.count-1
if not ChkListBoxRouti nes.getitemchec ked(i) then
...
end if
next i
Armin

Nov 21 '05 #5
"marcmc" <ma****@discuss ions.microsoft. com> schrieb:
How though can i see what is in the array?


In which array?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #6
The ItemtoSet1 array Heinfried.
Which leads me to another question, Can you add more than one value to an
arrayList in and/or create a multi-dimensional array?

Just something that croopped up a long time ago which I didn't get a chance
to work out at the time...

"marcmc" wrote:
Below we can get the checkedItems within a checkedListBox but I have
attempted to find the unchecked items but I cannot seem to find a method. Is
there one or can I somehow manipulate the below code to find the uncChecked
items?

Dim ItemtoSet As New ArrayList

For Each CheckedItem As Object In ChkListBoxRouti nes.CheckedItem s
ItemtoSet.Add(C heckedItem)
Next

Nov 21 '05 #7
"marcmc" <ma****@discuss ions.microsoft. com> schrieb
The ItemtoSet1 array Heinfried.
Herfried, not Heinfried. :-)

Which leads me to another question, Can you add more than one value
to an arrayList
Well, a list is there to contain more values
in and/or create a multi-dimensional array?

No, but an item in the arraylist can be another arraylist or an array.
Armin
Nov 21 '05 #8
Just noticed apologies Herfried.
It's was one of those situations where I was attempting to remember
something so much that I forgot it, kinda like when you lose a PIN Number !!
Anyway thanks again
"Armin Zingler" wrote:
"marcmc" <ma****@discuss ions.microsoft. com> schrieb
The ItemtoSet1 array Heinfried.


Herfried, not Heinfried. :-)

Which leads me to another question, Can you add more than one value
to an arrayList


Well, a list is there to contain more values
in and/or create a multi-dimensional array?

No, but an item in the arraylist can be another arraylist or an array.
Armin

Nov 21 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5021
by: Stevey | last post by:
I have the following XML file... <?xml version="1.0"?> <animals> <animal> <name>Tiger</name> <questions> <question index="0">true</question> <question index="1">true</question> </questions>
7
2649
by: nospam | last post by:
Ok, 3rd or is it the 4th time I have asked this question on Partial Types, so, since it seems to me that Partial Types is still in the design or development stages at Microsoft, I am going to ask it differently. FOUR QUESTIONS: The background: I got three (3) files
3
3075
by: Ekqvist Marko | last post by:
Hi, I have one Access database table including questions and answers. Now I need to give answer id automatically to questionID column. But I don't know how it is best (fastest) to do? table before rowID answID qryrow questionID datafield 1591 12 06e 06e 06e question 1593 12 06f 06f 06f question 1594 12 answer to the question 06f
10
3411
by: glenn | last post by:
I am use to programming in php and the way session and post vars are past from fields on one page through to the post page automatically where I can get to their values easily to write to a database or continue to process on to the next page. I am now trying to learn ASP to see if we can replace some of our applications that were written in...
2
1481
by: marcmc | last post by:
Hey All, I want to find whether my first item within my CheckListBox is in a checked or unchecked state. I tried the following but it did not work, Can anyone help. If CkListBoxRoutines.Items.Item(0) = CheckedState.Checked Then messagebox("Marc") End If
10
3701
by: Rider | last post by:
Hi, simple(?) question about asp.net configuration.. I've installed ASP.NET 2.0 QuickStart Sample successfully. But, When I'm first start application the follow message shown. ========= Server Error in '/QuickStartv20' Application. -------------------------------------------------------------------------------- Configuration Error...
53
4043
by: Jeff | last post by:
In the function below, can size ever be 0 (zero)? char *clc_strdup(const char * CLC_RESTRICT s) { size_t size; char *p; clc_assert_not_null(clc_strdup, s); size = strlen(s) + 1;
2
1414
by: =?Utf-8?B?TWFyaw==?= | last post by:
I have a form which during the load event creates 1 or more checkboxes. Also, as each checkbox is added to the controls collection I also add a handler: AddHandler o.Click, AddressOf MedicationStop_Click So, all of the checkboxes use the same handler That part seems to go well. However, if a user actually checks or unchecks one or...
14
9402
by: sarabonn | last post by:
Hello everyone, In my windows form application iam having a login form with 2 textboxes for username and password and checkbox (to keep the user logged in). When the user login for the first time if he check the checkbox then it should remains checked(iam having a option to uncheck in a menu item) even when the...
0
7923
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7852
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7974
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5719
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5395
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3845
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2364
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1192
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.