PC Review


Reply
Thread Tools Rate Thread

checkedListBox1.ClearSelected dosn't work properly

 
 
Reza
Guest
Posts: n/a
 
      18th Oct 2004
checkedListBox1.ClearSelected(),dosn't clear my selections in my
checkedboxlist.
How can I clear an specific item based on its value ,name or anything else?

thanks for your response.




 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      18th Oct 2004
"Reza" <(E-Mail Removed)> schrieb:
> checkedListBox1.ClearSelected(),dosn't clear my selections in my
> checkedboxlist.
> How can I clear an specific item based on its value ,name
> or anything else?



You can use the checkedlistbox's 'FindString' or 'FindStringExact methods to
get the index of a specific item, then you can use 'SetSelected(Index,
False)' to uncheck the item.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

 
Reply With Quote
 
Reza
Guest
Posts: n/a
 
      18th Oct 2004
Thanks,but it dosn't uncheck the item ,,it only removes the focus,that's it.
"Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> "Reza" <(E-Mail Removed)> schrieb:
> > checkedListBox1.ClearSelected(),dosn't clear my selections in my
> > checkedboxlist.
> > How can I clear an specific item based on its value ,name
> > or anything else?

>
>
> You can use the checkedlistbox's 'FindString' or 'FindStringExact methods

to
> get the index of a specific item, then you can use 'SetSelected(Index,
> False)' to uncheck the item.
>
> --
> Herfried K. Wagner [MVP]
> <URL:http://dotnet.mvps.org/>
>



 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      18th Oct 2004
"Reza" <(E-Mail Removed)> schrieb:
> Thanks,but it dosn't uncheck the item ,,it only removes the
> focus,that's it.


Use 'SetItemChecked' instead of 'SetSelected'.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
 
Reply With Quote
 
Reza
Guest
Posts: n/a
 
      18th Oct 2004
how can I uncheck an item based on its memeber value?
"Reza" <(E-Mail Removed)> wrote in message
news:%23$%(E-Mail Removed)...
> checkedListBox1.ClearSelected(),dosn't clear my selections in my
> checkedboxlist.
> How can I clear an specific item based on its value ,name or anything

else?
>
> thanks for your response.
>
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
checkedListBox1.ClearSelected() Reza Microsoft VB .NET 1 16th Oct 2004 12:06 PM
checkedListBox1.ClearSelected() Reza Microsoft C# .NET 1 16th Oct 2004 04:41 AM
Mouse dosn't work properly =?Utf-8?B?SnVsZW4=?= Windows XP Hardware 2 16th Jul 2004 08:05 PM
My computer dosn't show the words properly raheleh Windows XP Drivers 0 18th Jan 2004 08:32 PM
My computer dosn't show the words properly raheleh Windows XP New Users 0 18th Jan 2004 08:32 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:14 PM.