Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Color at my grid
Message
From
09/03/2006 07:31:38
 
 
To
09/03/2006 07:25:30
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01102695
Message ID:
01102713
Views:
19
hi,
thank you all very much.
>>hi,
>>if you mean i must change it as
>>IF TYPE(EVALUATE(lcCS)) = '10'
>>
>>i get the same error
>
>Type(...) = '10' ????? If it didn't error anyway the result would always be .f. Check help for type().
>
>Why are you evaluating it? Type checking already does it and in dynamicbackcolor code you don't need evaluate when you have the controlsource itself.
>
>Public oForm
>oForm = Createobject('myForm')
>oForm.Show
>
>Define Class myForm As Form
> DataSession = 2
> Height=500
> Width=600
>
> Add Object cmdSetColor As CommandButton With Caption = "Set Color"
> Add Object myGrid As Grid With Top=50,Height=450,Width=600
>
> Procedure Load
>  Set Multilocks On
>  Use (_samples+'data\orditems')
>  CursorSetProp("Buffering",5,'orditems')
> Endproc
>
> Procedure cmdSetColor.Click
>  Local lcCS
>  With This.Parent.myGrid
>   For Each loColumn In .Columns
>    lcCS = loColumn.ControlSource
>    If Type(m.lcCS) = 'N'
>     loColumn.DynamicBackColor = ;
>      'IIF('+ m.lcCS + ' < 10, RGB(225, 128, 128), RGB(128,255,128))'
>    Endif
>   Endfor
>   .Refresh
>  Endwith
> Endproc
>Enddefine
>
Cetin
Previous
Reply
Map
View

Click here to load this message in the networking platform