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
Printable View
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
Try CCheckListBox (in MFC).
is it in the toolbox?
can you pls be more specific?
thanks
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.
Look it up in MSDN. Here, I've done it for you
There's a link to a sample program.
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.
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.Quote:
Originally posted by avi123
is it in the toolbox?
can you pls be more specific?
thanks
shouldn't I use my own class deriving from CCheckListBox?Quote:
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.
Do I have to deive my own class when using list control (and not list box)?
thanks again to all of you
avi
not necessarily.Quote:
shouldn't I use my own class deriving from CCheckListBox?
No, this control it's in the toolbox.Quote:
Do I have to deive my own class when using list control (and not list box)?
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.Quote:
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
so how do I add CCheckListBox, how do I determine how many check boxes will be?
thanks again
avi
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
what view (report/icon...) do I have to use in ListCtrl so I can add this LVS_EX_CHECKBOXESQuote:
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.
thanks
avi
you can use the "Report" viewQuote:
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