[fpc-pascal] Sets & FPC
    Justin Smyth 
    delphian at smythconsulting.net
       
    Sat Feb 20 12:32:45 CET 2010
    
    
  
Opps re reading the code it was actually
if (odSelected in State)  then
and state is defined as TOwnerDrawState which points back 
to -TBaseOwnerDrawState which is a set of TOwnerDrawStateType
Yet i see in TCustomListBox.DrawItem it has something the same -
  if not (odPainted in State) then
Kind Regards
Justin Smyth
----- Original Message ----- 
From: "cobines" <cobines at gmail.com>
To: "Justin Smyth" <delphian at smythconsulting.net>; "FPC-Pascal users 
discussions" <fpc-pascal at lists.freepascal.org>
Sent: Saturday, February 20, 2010 9:07 PM
Subject: Re: [fpc-pascal] Sets & FPC
> If state is of type TOwnerDrawStateType then it can have only one value:
>
> var
> state: TOwnerDrawStateType;
> ...
> if odSelected = state then
> begin
>  // My Code....
> end;
>
>
> If state is a set type of TOwnerDrawStateType then it can have more 
> values:
>
> var
> state: set of TOwnerDrawStateType;
> ...
> if odSelected in state then
> begin
>  // My Code....
> end;
>
>
> Maybe you meant to declare 'state' as a set.
>
> --
> cobines
>
> 
    
    
More information about the fpc-pascal
mailing list