Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
#define
Message
From
17/04/2018 12:31:53
 
 
To
17/04/2018 12:09:51
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01659466
Message ID:
01659473
Views:
46
>
>This.SetAll(;
>  'DynamicForeColor';
>,  'IIF( RECNO( This.RecordSource ) = This.nRecNo, ' + cast(ACTIVEROWFORECOL as M) + ', ' + cast(ROWFORECOL as M) + ')';
>, 'COLUMN' ;
>)
>
>
>may also work with a textmerge() (not sure though, TBT)


Thierry,

Antonio's solution works like a charm.

Rgds,

Koen


>
>
>This.SetAll(;
>  'DynamicForeColor';
>,  textmerge('IIF( RECNO( This.RecordSource ) = This.nRecNo, <<ACTIVEROWFORECOL>>, <<ROWFORECOL>>)');
>, 'COLUMN' ;
>)
>
>
>
>>Hi,
>>
>>I would like to make use of constants to set my grids colours, have therefore issued :
>>
>>
>>#DEFINE ACTIVEROWFORECOL		16711680		&&KOBALT blue
>>#DEFINE ROWFORECOL			0 			&&black
>>This.SetAll( 'DynamicForeColor', ;
>>	'IIF( RECNO( This.RecordSource ) = This.nRecNo, ACTIVEROWFORECOL, ROWFORECOL )', 'COLUMN' )
>>
>>
>>errors
>>
>>wheras
>>
>>This.SetAll( 'DynamicForeColor', ;
>>	'IIF( RECNO( This.RecordSource ) = This.nRecNo, 16711680, 0 )', 'COLUMN' )
>>
>>
>>works smouthly
>>How should I correct my statement using #DEFINE?
>>
>>Rgds,
>>
>>Koen
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform