| View previous topic :: View next topic |
| Author |
Message |
rw Guest
|
Posted: Wed Apr 12, 2006 10:03 am Post subject: TCheckListBox |
|
|
Hi
I have some problems using TCheckListBox.
The Items do not have a Checked property.
Is this a bug, or is there a problem with my source files.
I´m using BCB6 pro.
best regards
Robert |
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Wed Apr 12, 2006 11:03 am Post subject: Re: TCheckListBox |
|
|
"rw" <rw (AT) denconfoods (DOT) dk> wrote in message
news:443ccb56$1 (AT) newsgroups (DOT) borland.com...
| Quote: | The Items do not have a Checked property.
|
The Checked property is implemented in TCheckListBox itself, not in its
Items property. This is covered in TCheckListBox's documentation. For
example:
for(int x = 0; x < CheckListBox1->Items->Count; ++x)
{
if( CheckListBox1->Checked[x] )
{
// do something ...
}
}
Gambit |
|
| Back to top |
|
 |
Hans Galema Guest
|
Posted: Wed Apr 12, 2006 11:03 am Post subject: Re: TCheckListBox |
|
|
rw wrote:
| Quote: | I have some problems using TCheckListBox.
The Items do not have a Checked property.
|
if ( CheckListBox1->Checked[2] )
;
Hans. |
|
| Back to top |
|
 |
Thorsten Kettner Guest
|
Posted: Wed Apr 12, 2006 11:03 am Post subject: Re: TCheckListBox |
|
|
"rw" <rw (AT) denconfoods (DOT) dk> wrote:
| Quote: | I have some problems using TCheckListBox.
The Items do not have a Checked property.
Is this a bug, or is there a problem with my source files.
I´m using BCB6 pro.
|
The Items are just TStrings and have no Checked property. The
TCheckListBox itself has a Checked property which is accessable
through runtime only.
for(int i = 0; i < CheckListBox1->Count; ++i)
if(CheckListBox1->Checked[i])
ShowMessage(CheckListBox1->Items->Strings[i]);
Is that what you wanted to know? |
|
| Back to top |
|
 |
rw Guest
|
Posted: Wed Apr 12, 2006 12:03 pm Post subject: Re: TCheckListBox |
|
|
I must have missed the [] in the doc.
thanks you all
Robert |
|
| Back to top |
|
 |
|