473,406 Members | 2,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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 ChkListBoxRoutines.CheckedItems
ItemtoSet.Add(CheckedItem)
Next
Nov 21 '05 #1
8 1403
"marcmc" <ma****@discussions.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 ChkListBoxRoutines.CheckedItems
ItemtoSet.Add(CheckedItem)
Next


for i as integer=0 to ChkListBoxRoutines.items.count-1
if not ChkListBoxRoutines.getitemchecked(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****@discussions.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 ChkListBoxRoutines.CheckedItems
ItemtoSet.Add(CheckedItem)
Next


for i as integer=0 to ChkListBoxRoutines.items.count-1
if not ChkListBoxRoutines.getitemchecked(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 ChkListBoxRoutines.Items.Count - 1
If Not ChkListBoxRoutines.GetItemChecked(UnCheckedItem) Then
ItemtoSet1.Add(UnCheckedItem)
End If
Next UnCheckedItem

"Armin Zingler" wrote:
"marcmc" <ma****@discussions.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 ChkListBoxRoutines.CheckedItems
ItemtoSet.Add(CheckedItem)
Next


for i as integer=0 to ChkListBoxRoutines.items.count-1
if not ChkListBoxRoutines.getitemchecked(i) then
...
end if
next i
Armin

Nov 21 '05 #5
"marcmc" <ma****@discussions.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 ChkListBoxRoutines.CheckedItems
ItemtoSet.Add(CheckedItem)
Next

Nov 21 '05 #7
"marcmc" <ma****@discussions.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****@discussions.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
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
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...
3
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...
10
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...
2
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...
10
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...
53
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
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...
14
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.