Page 1 of 1

DC_XbpGetPres does not work properly when DISABLEDCOLOR set

Posted: Sat Dec 14, 2013 2:32 pm
by rsmarks
DC_XbpGetPres does not work properly when used to set the disabled foreground color if DCGETOPTIONS sets the DISABLEDCOLOR. However, DCSAY GETPRESENTATION does work properly. I had expected that I could just use DC_XpbGetPres once instead of having to specify GETPRESENTATION on every get, but that does not seem to be the case. In the example program, both disabled gets should look the same. They do not.

LOCAL GetList:={}, cData1:="Data 1", cData2:="Data 2", GetOptions
LOCAL aGetPres:={ { XBP_PP_DISABLED_FGCLR, GRA_CLR_BLACK } }

DC_XbpGetPres(aGetPres)

@ 0,0 DCSAY "DATA 1" GET cData1 WHEN {|| .F.}
@ 2,0 DCSAY "DATA 2" GET cData2 WHEN {|| .F.} GETPRESENTATION aGetPres

DCGETOPTIONS DISABLEDCOLOR GRA_CLR_BACKGROUND

DCREAD GUI ADDBUTTONS FIT OPTIONS GetOptions

Thanks.

Re: DC_XbpGetPres does not work properly when DISABLEDCOLOR

Posted: Mon Dec 16, 2013 3:24 am
by Tom
Take a look at DC_GetOptDefault().

Re: DC_XbpGetPres does not work properly when DISABLEDCOLOR

Posted: Mon Dec 16, 2013 11:54 am
by rsmarks
Tom,

In my actual program I use DC_GetOptDefault, but for the sake of simplicity I did not include it in my example. It doesn't matter whether I set DISABLEDCOLOR using DC_GetOptDefault or with DCGETOPTIONS, DC_XbpGetPres still does not work properly.

Thanks,

Bob

Re: DC_XbpGetPres does not work properly when DISABLEDCOLOR

Posted: Mon Dec 16, 2013 12:34 pm
by rdonnay
I will get to this as soon as I can. Things get a little busy on Mondays.