CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2009
    Posts
    252

    [RESOLVED] CheckboxList Eval if Count-1 or Count-2 are Checked

    Hi all


    this its a very silly problem i have with CheckBoxList control, i dont know if its just me or what but the whole idea of the control its just great but the implementation its very confusing.

    im trying to eval something like this

    if CheckBoxList.Items.Item(CheckBoxList.Items.Count-1).Checked=true then.....
    or something like
    CheckBoxList.CheckedItems.Item(CheckBoxList.Items.Count-1) = Checked then...


    the problem its that i dont know how does the checkboxlist works but it just sucks that they had to make it so confuising....

    i've handled lots and lots of collection controls and they all work in a similar and simple way but this its just confusing.

  2. #2
    Join Date
    Feb 2009
    Posts
    252

    Re: CheckboxList Eval if Count-1 or Count-2 are Checked

    Excuse my stupidity it was simople but i was stuk in this since yesterday night...

    i was looking for a property, but its a methood which does what i needed.

    this its a example

    MsgBox(ChecboxList1.GetItemChecked(ChecboxList1.Items.Count - 1))

    GetItemChecked < this its the methood i needed.

  3. #3
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: [RESOLVED] CheckboxList Eval if Count-1 or Count-2 are Checked

    When you press the '.' key, the available options should jump up.

    I think you need the CLICK event.

    http://www.startvbdotnet.com/controls/checkbox.aspx
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured