Justin Smyth wrote
> how do I do something like this
>
> if odSelected in state then
> begin
> // My Code
> end;
>
> I get this error - Error: Incompatible types: got "TOwnerDrawStateType"
> expected "
>
> "
Hi Justin,
I'm sure you have fixed this by now, but for anyone else, the answer
On 21 Feb 2010, at 13:20, Justin Smyth wrote:
> The orginal code comes from JVCL , which wont complile under FPC , the actual
> unit is jvlistbox.pas
Without full source code that compiles rather than uncompilable snippets it
takes a lot more time to help you. Please post the full source code
riginal Message -
From: "Jonas Maebe"
To: "Justin Smyth" ; "FPC-Pascal users
discussions"
Sent: Sunday, February 21, 2010 8:11 PM
Subject: Re: [fpc-pascal] Sets & FPC
On 21 Feb 2010, at 07:26, Justin Smyth wrote:
I've done the bit Micheal suggest n
On 21 Feb 2010, at 07:26, Justin Smyth wrote:
> I've done the bit Micheal suggest now which i highlight TWMDrawItem it says
> its comes from TLMDrawItems.
>
> i still get Error: Incompatible types: got "TOwnerDrawStateType" expected
> ""
Can you post the full program somewhere? (or the full s
;
Cc: "Justin Smyth"
Sent: Saturday, February 20, 2010 11:43 PM
Subject: Re: [fpc-pascal] Sets & FPC
On Sat, 20 Feb 2010, Jonas Maebe wrote:
On 20 Feb 2010, at 13:15, Michael Van Canneyt wrote:
On Sat, 20 Feb 2010, Justin Smyth wrote:
procedure TJvCustomListBox.CNDrawIt
On Sat, 20 Feb 2010, Jonas Maebe wrote:
On 20 Feb 2010, at 13:15, Michael Van Canneyt wrote:
On Sat, 20 Feb 2010, Justin Smyth wrote:
procedure TJvCustomListBox.CNDrawItem(var Msg: TWMDrawItem);
var
State: TOwnerDrawState;
Try
State : Set of TOwnerDrawState;
It is already a set:
lc
On 20 Feb 2010, at 13:15, Michael Van Canneyt wrote:
> On Sat, 20 Feb 2010, Justin Smyth wrote:
>
>> procedure TJvCustomListBox.CNDrawItem(var Msg: TWMDrawItem);
>> var
>> State: TOwnerDrawState;
>
> Try
>
> State : Set of TOwnerDrawState;
It is already a set:
lcltype.pp: TOwnerDrawState =
On Sat, 20 Feb 2010, Justin Smyth wrote:
procedure TJvCustomListBox.CNDrawItem(var Msg: TWMDrawItem);
var
State: TOwnerDrawState;
Try
State : Set of TOwnerDrawState;
Michael.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://li
lRect(rcItem);
if odFocused in State then
DrawFocusRect(hDC, rcItem);
end;
end;
Canvas.Handle := 0;
end;
end;
- Original Message -
From: "Jonas Maebe"
To: "Justin Smyth" ; "FPC-Pascal users
discussions"
Sent: Saturday, February 20, 20
On 20 Feb 2010, at 12:32, Justin Smyth wrote:
> 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
Please post sample code that should compile
Kind Regards
Justin Smyth
- Original Message -
From: "cobines"
To: "Justin Smyth" ; "FPC-Pascal users
discussions"
Sent: Saturday, February 20, 2010 9:07 PM
Subject: Re: [fpc-pascal] Sets & FPC
If state is of type TOwnerDrawStateType then it c
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 odSelec
I've got a piece of code which uses TOwnerDrawStateType and TBaseOwnerDrawState
which is set of TOwnerDrawStateType , if i have on variable called state which
is TOwnerDrawStateType how do i do something like this
if odSelected in state then
begin
// My Code
end;
i get this error - Error
13 matches
Mail list logo