Everything available to TCustomlistBox is also available in TCheckListBox so
the cast un unnecessary.
By default you can't get at the protected properties of an object. Prptected
properties are designed to be accessible from within decendants, of the
class. You can also get at the protected parts of an object if you are in an
object defined in the same unit as the object in question. Therefore if you
put somethin like TCheatCLBox = class(TCheckListBox) in your units interface
and then go (myCheckListbox as TCheatCLBox).Multiselect you will be fine.
I believe that TCheckListBox is already in MultiSelect and ExtendedSelect
mode. Think of it as a list box that uses check boxes to show what is
selected rather than the standard blue line.
When we want the functionality you want we either use a 3rd party component
we have called TPickList (with some modifications) or we setup a TTreeView
to display checks as its state images.
Stacey
> -----Original Message-----
> From: James Low [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 8 June 2001 8:25 a.m.
> To: Multiple recipients of list delphi
> Subject: [DUG]: TCustomListBox. Multiselect
>
>
> I am using a TCheckListBox and see its imediate ancestor is
> TCustomlistBox.
> TCustomlistBox has a protected property Multiselect. However,
> when I use my
> TCheckListBox so:
>
> (myCheckListbox as TCustomListbox).Multiselect := TRue
>
> I get told the property does not exist. The VCL code
> implements Multiselect.
>
>
> Why is this ... and how do I get by ListBox to Multiselect? I
> guess I am
> missing something fundamental. The problem is not the
> "myCheckListbox as
> TCustomListbox" bit as I can free the object etc ...
>
> In advance thanks.
> --------------------------------------------------------------
> -------------
> New Zealand Delphi Users group - Delphi List -
> [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"