473,320 Members | 1,600 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,320 software developers and data experts.

Using A CheckedListBox

Could anybody help ne with this?

In VB6 / VBA, I could set up a listbox, with tickboxes/circles to the
side of each item. Selecting an Item caused the box to tick. Choosing
another deticked the original and ticekd the new one.

In .net, with a CheckedListBox with single selection, you can only
have obe item highlighted. But the ticks remain on previous items.

How can I just have one item selected and ticked ? And then I would
want to use that item to write to a file?

Thanks

D.
Nov 20 '05 #1
3 1555
On Wed, 18 Feb 2004 22:29:52 +0000, Gobble.D.Gook <He**@now.com>
wrote:
How can I just have one item selected and ticked ? And then I would
want to use that item to write to a file?


When the ItemChecked event is fired, could you not just loop through
all the other items and uncheck them?
Nov 20 '05 #2
On Thu, 19 Feb 2004 10:11:54 +0000 (UTC), BluDog
<Re**********@here.com> wrote:

When the ItemChecked event is fired, could you not just loop through
all the other items and uncheck them?


Seem to get into an endless loop doing that, as the event fires as I
change the checkstate ....

Nov 20 '05 #3
OK, heres the answer, if anyone else wants to do this ...

Private Sub lstSupport_ItemCheck(ByVal sender As Object, ByVal e
As System.Windows.Forms.ItemCheckEventArgs) Handles
lstSupport.ItemCheck

If e.NewValue = CheckState.Checked Then
For Each i In lstSupport.CheckedIndices
lstSupport.SetItemChecked(i, False)
Next
End If

End Sub
Nov 20 '05 #4

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

Similar topics

4
by: Reza | last post by:
Hi, I want to check one of the memebrs of a checkedListbox based on its value. I 'm getting a number(say 1355) from another control and based on that number I want to check an item which its...
1
by: xiuyu_0129 | last post by:
Hi All, How do I store a string value for an item in a CheckedListBox in Windows Form? For a web based application, CheckBoxList allowed us to store 2 string values for the item in it. How do...
2
by: CC | last post by:
Hi, We are populating a CheckedListBox from a database. Based on a selection by the user, the CheckedListBox either contains ALL possible members of a set, or a subset of possible members. The...
8
by: Derek Martin | last post by:
Here is some code that I need help with please: Dim result As New ArrayList Try For i = 0 To objecttest1.PersonList.person_returnnumber - 1 result =...
2
by: Manuel Canas | last post by:
Hi there, I'm having this dilema with a checkedlistbox. I have an array of items in there, what I want to accomplish is the following; The user could check all the items in the...
0
by: Terry Olsen | last post by:
Dim dirs() as string = Directory.GetDirectories(MyPath) CheckedListBox.DataSource = dirs CheckedListBox.Update For I as Integer = 0 To CheckedListBox.Items.Count - 1...
1
by: Huahe | last post by:
Hi, I have an checkedlistbox with a lot of items, so there is a vertical scrollbar in the checkedlistbox. I want to make the checkedlistbox invisible when the mouseleave event goes off. The...
3
by: BostonNole | last post by:
Does anyone know how to get the checkedlistbox to display items horizontally on a windows form? It seems that it only displays its check box items vertically (up and down), which is not what I...
6
by: Steve Teeples | last post by:
Can someone show me an example of how to place a "CheckedListBox" property within a PropertyGrid? -- ----------- Thanks, Steve
1
by: John | last post by:
Is there a way to make the font for the selected item(s) bold in a CheckedListBox? Thanks, John
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.