Page 1 of 1

Changing Color of Get with When clause

Posted: Mon Mar 06, 2017 4:01 pm
by Jack
Hi,
I use the WHEN clause with GET in other to desable the GET .
How is it possible to change the fore of background color when the WHEN retun .F.
I'd like that the bakgroud is Yellow .

REDEFINE GET oG1 var wtotal picture "999"
REDEFINE GET oG2 var wxx WHEN wtotal > 10


Thanks for your help .

Re: Changing Color of Get with When clause

Posted: Mon Mar 06, 2017 4:14 pm
by nageswaragunupudi
First globally set
TGet():lDisColors := .F. // Disables default disabled colors

Then
oGet:nClrTextDis := <nTextColorWhenDisabled>
oGet:nClrPaneDis := <nBackColorWhenDisabled>

Re: Changing Color of Get with When clause

Posted: Mon Mar 06, 2017 4:37 pm
by Jack
Hi,

TGet():lDisColors := .F. works nice but oG2:nClrTextDis := RGB( 255, 199, 206 ) dont work .

Error description: Error BASE/1005 No exported variable: NCLRTEXTDIS

Thanks

Re: Changing Color of Get with When clause

Posted: Mon Mar 06, 2017 4:56 pm
by nageswaragunupudi
These are the DATAs in TGet program

DATA nClrTextDis, nClrPaneDis

Please ensure oG2 is already defined as GET

May I know your FWH version?

Re: Changing Color of Get with When clause

Posted: Mon Mar 06, 2017 5:12 pm
by Jack
Fivewin 2014 or 2016

Thanks for your help .

Re: Changing Color of Get with When clause

Posted: Mon Mar 06, 2017 5:20 pm
by nageswaragunupudi
I am not sure about 2014, but it should work with any versions from 2015 onwards. Please use your 2016 version.

Re: Changing Color of Get with When clause

Posted: Mon Mar 06, 2017 5:25 pm
by Jack
Same with FWH16 ??
What is the first argument ?


Thanks .
Application
===========
Path and name: G:\Apps\BioBanque\bhul.exe (32 bits)
Size: 3,948,544 bytes
Compiler version: Harbour 3.2.0dev (r1601050904)
FiveWin Version: FWH 16.10
Windows version: 6.2, Build 9200

Time from start: 0 hours 0 mins 5 secs
Error occurred at: 06/03/2017, 18:22:01
Error description: Error BASE/1005 No exported variable: NCLRTEXTDIS
Args:
[ 1] = U
[ 2] = N 13551615

Stack Calls
===========

Re: Changing Color of Get with When clause

Posted: Mon Mar 06, 2017 6:40 pm
by nageswaragunupudi
Can you please reproduce your program?