-
February 5th, 2004, 08:35 AM
#1
list box - check box
Hi,
I was wondering if there is, something like a dynamic list of checkboxs, is it something that is implemented threw list box?
or in other words I need to implement a dialog with a variable number of checkboxs....
any idea?
thanks
avi
Last edited by avi123; February 5th, 2004 at 08:39 AM.
-
February 5th, 2004, 08:38 AM
#2
Try CCheckListBox (in MFC).
-
February 5th, 2004, 08:40 AM
#3
is it in the toolbox?
can you pls be more specific?
thanks
-
February 5th, 2004, 08:53 AM
#4
Try List view
Hi mate,
You can use a list control (list view) in the list mode and use the extended style LVS_EX_CHECKBOXES to get the same.
Life is short, enjoy it with a smile as long as it lasts.
User error. Replace User and press any key when ready. - Anonymous
-
February 5th, 2004, 08:54 AM
#5
Look it up in MSDN. Here, I've done it for you
There's a link to a sample program.
-
February 5th, 2004, 08:57 AM
#6
no, it's not in the toolbox.
you have to Create(...) yourself.
however you can try the ListCtrl with the extended style LVS_EX_CHECKBOXES.
-
February 5th, 2004, 09:00 AM
#7
Originally posted by avi123
is it in the toolbox?
can you pls be more specific?
thanks
Use the resource edit to create a regular listbox. Then use ClassWizard to declare a control member variable using it. Change the control type from CListBox to CCheckListBox. There are a few styles you have to change in the resource editor, but off the top of my head I don't remember what they are. Owner Draw is one of them I think.
-
February 5th, 2004, 09:15 AM
#8
Originally posted by GCDEF
Use the resource edit to create a regular listbox. Then use ClassWizard to declare a control member variable using it. Change the control type from CListBox to CCheckListBox. There are a few styles you have to change in the resource editor, but off the top of my head I don't remember what they are. Owner Draw is one of them I think.
shouldn't I use my own class deriving from CCheckListBox?
Do I have to deive my own class when using list control (and not list box)?
thanks again to all of you
avi
-
February 5th, 2004, 09:20 AM
#9
shouldn't I use my own class deriving from CCheckListBox?
not necessarily.
Do I have to deive my own class when using list control (and not list box)?
No, this control it's in the toolbox.
-
February 5th, 2004, 09:21 AM
#10
Originally posted by avi123
shouldn't I use my own class deriving from CCheckListBox?
Do I have to deive my own class when using list control (and not list box)?
thanks again to all of you
avi
No need to derive your onw class unless you need some kind of functionality not provided by CCheckListBox or CListCtrl with the check style set.
-
February 8th, 2004, 09:52 AM
#11
so how do I add CCheckListBox, how do I determine how many check boxes will be?
thanks again
avi
-
February 8th, 2004, 09:57 AM
#12
Hi again,
I understnad from the answers that there is no need to inherit the class unless I need some specail functoialty
I decided to use list control (list view) and I want my checkboxes to be disabled, is this a special functality? cause I didn't find how do to that....
another thing, I only I want a few checkboxs in one line of the list, is this possible?
thanks again
avi
Last edited by avi123; February 8th, 2004 at 10:16 AM.
-
February 17th, 2004, 04:09 AM
#13
Originally posted by myth7676
no, it's not in the toolbox.
you have to Create(...) yourself.
however you can try the ListCtrl with the extended style LVS_EX_CHECKBOXES.
what view (report/icon...) do I have to use in ListCtrl so I can add this LVS_EX_CHECKBOXES
thanks
avi
-
February 17th, 2004, 04:28 AM
#14
Originally posted by avi123
what view (report/icon...) do I have to use in ListCtrl so I can add this LVS_EX_CHECKBOXES
thanks
avi
you can use the "Report" view
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|