Page 1 of 1

dccheckbox on dcstatic

Posted: Thu Jan 26, 2023 2:55 am
by skiman
Hi,

With the latest version a dccheckbox on a dcstatic is only readable if TYPE XBPSTATIC_TYPE_TEXT is used. You can't use a type as TYPE XBPSTATIC_TYPE_FGNDFRAME.

The code below shows the problem.

Code: Select all

#INCLUDE "dcdialog.CH"

FUNCTION Main()

LOCAL GetList[0], oGetStatic, oGetStatic2 ,lCheck := .F.

@ 0,0 DCSTATIC ;
       TYPE XBPSTATIC_TYPE_FGNDFRAME ;		// checkbox shows black caption which is unreadable
       SIZE 500,100 PIXEL OBJECT oGetStatic ;
       COLOR nil, GRA_CLR_WHITE

@ 10,10 dccheckbox lCheck prompt 'Checkbox test' parent oGetStatic PIXEL

@ 150,0 DCSTATIC ;
       TYPE XBPSTATIC_TYPE_TEXT ;        // Checkbox works when type is TEXT
       SIZE 500,100 PIXEL OBJECT oGetStatic2 ;
       COLOR nil, GRA_CLR_WHITE

@ 10,10 dccheckbox lCheck prompt 'Checkbox test' parent oGetStatic2 PIXEL

DCREAD GUI FIT 

RETURN nil

* ----------

PROC appsys ; return

Re: dccheckbox on dcstatic

Posted: Thu Jan 26, 2023 8:55 am
by rdonnay
I will look at this, but it's my guess that this is a problem with Xbase++ 2.0, not eXpress++, because there have been no changes to my code in that area.

Re: dccheckbox on dcstatic

Posted: Thu Jan 26, 2023 8:59 am
by rdonnay
Everything looks fine on my computer.
test5.JPG
test5.JPG (21.27 KiB) Viewed 4770 times

Re: dccheckbox on dcstatic

Posted: Thu Jan 26, 2023 9:06 am
by skiman
Hi Roger,

To say it with an often used function of yours: WTF.

Re: dccheckbox on dcstatic

Posted: Thu Jan 26, 2023 9:35 am
by Tom
Same her. Latest Xbase++, latest eXpress++:
checkbox.png
checkbox.png (2.9 KiB) Viewed 4768 times

Re: dccheckbox on dcstatic

Posted: Fri Jan 27, 2023 2:35 am
by skiman
Hi,

Yes, looks correct with latest Xbase++.

This is with Xbase 1.9.
checkbox.jpg
checkbox.jpg (13.24 KiB) Viewed 4748 times
Since I'm migrating to 2.0 the problem will be solved automatically.