6 Replies - 358 Views - Last Post: 03 July 2012 - 09:27 AM Rate Topic: -----

#1 tomharto  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 03-July 12

Uncheck all checkboxes except last one checked?

Posted 03 July 2012 - 06:35 AM

I have a checkedlistbox with a few items in it and I want it to do only have one checked at a time. Is this possible to do with a checkedlistbox way or is there an easier way to do this kind of thing?
Is This A Good Question/Topic? 0
  • +

Replies To: Uncheck all checkboxes except last one checked?

#2 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 4965
  • View blog
  • Posts: 10,563
  • Joined: 02-June 10

Re: Uncheck all checkboxes except last one checked?

Posted 03 July 2012 - 06:40 AM

Note the item ticked
Loop through an untick everything else.
Was This Post Helpful? 0
  • +
  • -

#3 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 6627
  • View blog
  • Posts: 23,984
  • Joined: 12-June 08

Re: Uncheck all checkboxes except last one checked?

Posted 03 July 2012 - 06:45 AM

Radiobuttons.. you are describing them.
Was This Post Helpful? 1
  • +
  • -

#4 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 4965
  • View blog
  • Posts: 10,563
  • Joined: 02-June 10

Re: Uncheck all checkboxes except last one checked?

Posted 03 July 2012 - 07:27 AM

Is there such a thing as a RadioButtonListBox to replace the CheckedListBox the OP is using?
Was This Post Helpful? 0
  • +
  • -

#5 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 6627
  • View blog
  • Posts: 23,984
  • Joined: 12-June 08

Re: Uncheck all checkboxes except last one checked?

Posted 03 July 2012 - 07:30 AM

Assuming this is some sort of miss-categorized ASP.NET webform - yes.
Was This Post Helpful? 0
  • +
  • -

#6 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 4965
  • View blog
  • Posts: 10,563
  • Joined: 02-June 10

Re: Uncheck all checkboxes except last one checked?

Posted 03 July 2012 - 08:52 AM

That's a big assumption from out of the blue.
What if its just a plain ole WinForm's application?
Was This Post Helpful? 0
  • +
  • -

#7 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 2039
  • View blog
  • Posts: 6,072
  • Joined: 05-May 12

Re: Uncheck all checkboxes except last one checked?

Posted 03 July 2012 - 09:27 AM

There is no RadioButton list for WinForms. You put RadioButtons in a container like a Form, GroupBox, or Panel, and they should manage themselves.

http://msdn.microsof...hxcyah(v=vs.90)

This post has been edited by Skydiver: 03 July 2012 - 09:27 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1