Results 1 to 14 of 14

Thread: how to make a multicolumn checkbox list?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227

    how to make a multicolumn checkbox list?

    hi,

    i want to add another label to each item in a checkbox list?
    anyone knows how?

    thanks

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227
    anyone?!

  3. #3
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    There are lots of examples of multicolumn comboboxes, I have even made one myself, just take one of them and apply the same things to the checkedlist.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227
    a listbox is what i need, not a combo box

  5. #5
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    I believe they use the same mechanism for drawing so you'd still use the DrawItem even to Owner draw each item however you want. I could be wrong I don't use the listbox that often.

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227
    thanks , i'll start working on it

  7. #7
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    If you get stuck I'm willing to help or if you want to disect the combo I did then it can be found at: http://www.edneeis.com/control.aspx?ID=7

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227
    thnkx, thats a wonderful and well written control you got there, helped me allot, know i'll try to do it for a listbox, i'll let you know the problems that i have, thanks again : )
    Last edited by persianboy; Oct 1st, 2003 at 02:39 PM.

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227
    i see that you can use the system.drawing for pics and strings , but what how to put a label for example, what i really want is a checkedlistbox with a label in it, the other thing is the values keep changing , so the Q's are >>

    Should i make this control by extendind the list box?
    if yes how to add an object such as a label to it?

  10. #10
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Yes I would inherit from Listbox. You can add other controls by adding them to the controls Control collection but it might be better to just use DrawString depending on what you need. Also for painting Common control things (like frames or combobox buttons...) there is a ControlPaint class that can be handy.

  11. #11

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227
    since the text of 1 of my columns is going to change allot, is there anyway we can redraw 1 of the index-es and not all?

  12. #12

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227
    what i'm trying to make is the same listbox that microsoft uses everywhere, like in mmc ( something like kazaa traffic tab ), you have the titles above, u can resize any just by dragging, and a bunch of items that makeup your multi column listbox, is this available for download somewhere?! do they use the same method that edneeis used in his control , by drawing?



    thnkx..

  13. #13

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227
    and user cannot interact with the checkbox created by the controlpaint class it just draws it, what should i do about that?! redraw all on every click? how can i add a object check box?

  14. #14
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Are you looking for the ListView? That is more like the multicolumn thing in Kazaa although I'm not sure if it supports checks or not. Unforunately you would probably have to just repaint the checkes when they are clicked.

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