473,549 Members | 2,583 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Checked ListBox - VB.Net 2003

I have a checked list box and am trying to use the SetItemCheck method as
follows:

mylistbox.SetIt emChecked(index toset, True)

It seems to have no effect and the display does not show the box as checked.
I've tried SetItemCheckedS tate with the same results using
CheckState.Chec ked.

Is this a bug in the checked listbox? It's driving me nuts as I've spent
over 3 hours trying to get it right.

--
Dennis in Houston
Nov 21 '05 #1
1 7006
After many hours of trying different things, I've concluded the Checked
ListBox in VB.Net 2003 has a BUG regarding setting the items check
programmaticall y as follows:

If you use the up/down arrows to select different items in the list box, you
can set the item checked or unchecked programmaticall y and it works fine.
However, if you select an item with the mouse click, you cannot change the
items checked/unchecked property using SetCheckedState or SetIemChecked! It
won't work and it causes the whole screen to blink when trying it.
--
Dennis in Houston
"Dennis" wrote:
Further information:

When I use the space bar to toggle the checked box, it seems to work but If
I click on the item to make it checked, then I can't seem to uncheck it using
SetItemChecked method.
--
Dennis in Houston
"Dennis" wrote:
I have a checked list box and am trying to use the SetItemCheck method as
follows:

mylistbox.SetIt emChecked(index toset, True)

It seems to have no effect and the display does not show the box as checked.
I've tried SetItemCheckedS tate with the same results using
CheckState.Chec ked.

Is this a bug in the checked listbox? It's driving me nuts as I've spent
over 3 hours trying to get it right.

--
Dennis in Houston

Nov 21 '05 #2

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

Similar topics

5
540
by: Brian | last post by:
Hi, All, I'm using MS.net 2003 and using a windows.forms.listbox control for my window application but I don't know why the Horizontal Scrollbar could NOT be shown even if I set HorizontalScrollbar = true. The text info in listbox already beyond its right edge. How can I see the hidden part info in listbox? here is a part of codes. ...
3
5300
by: Alan Lane | last post by:
Hello world: I have a Parent form with a combobox, where the user selects a Contract or Estimate number. Then, on a subform, I have a listbox that gets filled with the details of the selected Contract. The subform listbox shows 21 rows. That has been fine, but now we are starting to get some Contracts or Estimates with more than 21 items.
2
3606
by: JoeHenrich | last post by:
I am using VS.NET 2003 and am having an interesting issue with a Listbox control. Essentially, I have a form with a listbox on it. In the listbox doubleclick event I would like to do some processing and then close the form. However, I receive an error (Cannot access a disposed object named "ListBox".) after my doubleclick code has processed. ...
3
35905
by: Hrvoje Voda | last post by:
After I fill checked listbox with data, I would like to checked all items in list ? Hrcko
1
1670
by: Hrvoje Voda | last post by:
I fill a checked listBox with data from dataset. I would like, when a user checked one item , to save it in dataset. The problem is that I don't know how to get its ID number, because I have only a name ? Hrcko
3
5969
by: Hrvoje Voda | last post by:
I fill a checked listbox with name from dataset. I would like to go through that names and if I find the same name in list, then that line should be checked. How? Hrcko
3
1314
by: touf | last post by:
Hi, I've post this problem for few days, and I still have it, please give me any idea. I've a Tabcontrol with many tabpages, in each one I've a checked listBox. The problem is that when I check items in listBox and go to an other page I lost the check (when I return to my tabbpage I find all items Unchecked) How can I resolve this ....
3
2898
by: Dean Slindee | last post by:
In a checked listbox, I am allowing drag/drop of the items within (resequencing). Problem is, when dropping a checked item, the checked state always reverts to unchecked (unwanted). Anyone know how to set the checked state of a checked listbox item in code. Here is the drag/drop code, which works fine, except for unchecking the dropped...
10
3852
by: dm1608 | last post by:
Hi, all. I have a requirement for one of my programs to have a "Checked Listbox" that contains a list of all my local/remote drives. I woudl like users to click one or more drives that I need to search for particular files. Can anyone tell me how to implement this in .NET 2.0 using VB or C#?
0
7459
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...
0
7726
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7819
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5097
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
3505
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
3488
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1953
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
1
1064
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
772
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.