Page 1 of 2

dccheckbox appearance 2.0

Posted: Fri Oct 23, 2015 10:14 am
by Cliff Wiernik
Try the following code in Xbase++ 2.0 build 644 xdot versus Xbase++ 1.9 build 355 xdot

You will see different behavior for the disabled versus enabled checkboxes between the versions. Now if you use a PRESENTATION array instead of the COLOR clause, it displays the proper behavior. You can see in lines 3 and 4, for Xbase++ 2.0 it is showing the background color instead of the transparent color.

Would there being anything in Express++ build 262 that would be causing the COLOR clause to not work versus the PRESENTATION parameter approach. This is with theme implemented which is what is happening when I run it from within xdot.

Cliff

Code: Select all

@ 0,0 dctabpage otabpage SIZE 30, 10 TABWIDTH 10 CAPTION 'Xbase++ 1.9'
dcsetparent to otabpage
@ 2,1 DCGROUP ogroupbox SIZE 28,9
dcsetparent to ogroupbox
x:=.T.
@ 1,3 DCCHECKBOX  x prompt 'prompt' color GRA_CLR_BLACK,XBPSYSCLR_TRANSPARENT
@ 2,3 DCCHECKBOX  x prompt 'prompt'
@ 3,3 DCCHECKBOX  x prompt 'prompt' color GRA_CLR_BLACK,XBPSYSCLR_TRANSPARENT WHEN {|| .F.}
@ 4,3 DCCHECKBOX  x prompt 'prompt' WHEN {|| .F.}
@ 5,3 DCCHECKBOX  x prompt 'prompt' PRESENTATION {{ XBP_PP_BGCLR, -255 }} WHEN {|| .F.}
dcread gui
checkboxtest.jpg
checkboxtest.jpg (24.34 KiB) Viewed 17776 times

Re: dccheckbox appearance 2.0

Posted: Fri Oct 23, 2015 10:25 am
by rdonnay
I get the same result with eXpress++ build 262 whether I compile in 1.9 or 2.0.

Which version of eXpress++ is working the way you want it to work?

Re: dccheckbox appearance 2.0

Posted: Fri Oct 23, 2015 11:29 am
by Auge_Ohr
Cliff Wiernik wrote:Try the following code in Xbase++ 2.0 build 644 xdot versus Xbase++ 1.9 build 355 xdot
your Sample show result on Win7 where DWM work different ... try it under Win 8 / 10

Re: dccheckbox appearance 2.0

Posted: Fri Oct 23, 2015 12:02 pm
by Cliff Wiernik
What is DVM. I will have to wait until I get home to try Windows 10 as my work system is only Windows 7.

Re: dccheckbox appearance 2.0

Posted: Fri Oct 23, 2015 12:28 pm
by Cliff Wiernik
Roger,

I don't understand what you mean when you compile with 1.9 or 10, you get the same. Are you getting the same as the jpg's I submitted.

In productions we use 1.9. This is tested with 262. I had been using 261 for testing prior to the conference. However, the behavior is the same when themes are enabled/win7 for builds 259/261/262. When run via xdot you get differences between 2.0 and 1.9 versions for 259/261/262. All are the same and misbehaving. In 2.0, line 3 has a background but in the 1.9 version it does not have a background. I tested with all three version using xdot. The 1.9 version is correct appearance as the transparent color is being used and respected.

I created compiled version using 262 under both 1.9 and 2.0 and the mimic the xdot versions. You need to be using thems, otherwise the tabpages background is GRA_CLR_BACKGROUND. With build 259 and the bin20 folder, there were now manifests so I copied the xdemo one from the bin19_sl1 folder. It did not provide themes unless I renamed the xdot.exe/...manifest files to a different name. It then provide the same behavior. In the 2.0 version, only line 2 and 4 should show the GRA_CLR_BACKGROUND but line 3 is also. That is the problem.

I don't know if it is an Alaska problem or not. But you can see that for line 5, which is attempting to do the same but via a PRESENTATION parameter array, it is working correctly. Only the BACKGROUND color is not working. I recall a few versions back, maybe 255, Jack had some things in the browses/etc that was doing something with presentation parameters. I don't if this may be an issue or not. I am not working with build 255 anymore.

Re: dccheckbox appearance 2.0

Posted: Fri Oct 23, 2015 1:11 pm
by rdonnay
I don't understand what you mean when you compile with 1.9 or 10, you get the same. Are you getting the same as the jpg's I submitted.
Your post is too complicated to follow. Too many variables.

What does this have to do with Xdot?

Can't we just talk about how it behaves in a compiled program?

Re: dccheckbox appearance 2.0

Posted: Fri Oct 23, 2015 1:43 pm
by Cliff Wiernik
I just used xdot as it was easy to test the example.

Just look at the attached zip file. It is ready to go. Compile under whatever version of express/xbase you want. It will generate the two files images of the screen. It is only 13 lines of code. I used xdot as it was easy to show the example.

But the zip file has the prg/xpj/manifest file needed to compile and test. You will get the same results as the in the jpg as listed for each version.

Re: dccheckbox appearance 2.0

Posted: Fri Oct 23, 2015 5:37 pm
by Auge_Ohr
Cliff Wiernik wrote:What is DVM. I will have to wait until I get home to try Windows 10 as my work system is only Windows 7.
Desktop Windows Manager which draw those visual Effects on Windows 7
as i say compare it with Windows 8 / 10 DWM.

Re: dccheckbox appearance 2.0

Posted: Sat Oct 24, 2015 10:20 pm
by Auge_Ohr
Cliff Wiernik wrote:Try the following code in Xbase++ 2.0 build 644 xdot versus Xbase++ 1.9 build 355 xdot

Code: Select all

@ 0,0 dctabpage otabpage SIZE 30, 10 TABWIDTH 10 CAPTION 'Xbase++ 1.9'
dcsetparent to otabpage
@ 2,1 DCGROUP ogroupbox SIZE 28,9
dcsetparent to ogroupbox
what happens when not using Groupbox / Tabpage ?
what happens when do not set Background Color or set other Color than XBPSYSCLR_TRANSPARENT / -255 ?

Re: dccheckbox appearance 2.0

Posted: Sun Oct 25, 2015 4:12 pm
by Cliff Wiernik
I enhanced the sample below per your requests to try with the checkboxes with just the tabpage being the parent and then with the groupbox being the child of the tabpage and the checkboxes being the child of the groupbox. I also tired with the background color being GRA_CLR_RED. You can see that when compiled with Xb1.9/exp262 that the colors are as expected. With 2.0, the transparent color is only working via the presentation parameters when disabled. With the GRA_CLR_RED background color, even with the presentation parameter in use, it is different than XB1.9. I did not try this with exp259 but I expect that the behavior would be the same.

This is with themes enabled and enabled for the tabpage. I did not try without a tabpage but tried by removing the manifest and enclosed the image. The behavior between 1.9 is the same in that case.

So it appears that something is not working properly for Xbase 2.0/Express with themes enabled and the :SetcolorBG() method versus the use of presentation parameters. This has been forwarded with a prior example to Andreas at Alaska and I will also provide Alaska Support with this example.

I do not know if the interaction of Express has anything to do with this as the same Express code is used for both versions.

Code: Select all

#include "dcdialog.ch"
LOCAL Getlist := {}, x := .T., oTabpage, ogroupbox


@ 0,0 dctabpage otabpage SIZE 30, 30 TABWIDTH 10 CAPTION 'Xbase++ 2.0'
dcsetparent to otabpage
@ 1,3 DCCHECKBOX  x prompt 'prompt1' color GRA_CLR_BLACK,XBPSYSCLR_TRANSPARENT
@ 2,3 DCCHECKBOX  x prompt 'prompt2'
@ 3,3 DCCHECKBOX  x prompt 'prompt3' color GRA_CLR_BLACK,XBPSYSCLR_TRANSPARENT WHEN {|| .F.}
@ 4,3 DCCHECKBOX  x prompt 'prompt4' WHEN {|| .F.}
@ 5,3 DCCHECKBOX  x prompt 'prompt5' PRESENTATION {{ XBP_PP_BGCLR, -255 }} WHEN {|| .F.}
@ 6,3 DCCHECKBOX  x prompt 'prompt6' EVAL {|o| o:SetColorBG(XBPSYSCLR_TRANSPARENT)} WHEN {|| .F.}
@ 7,3 DCCHECKBOX  x prompt 'prompt7' color GRA_CLR_BLACK,GRA_CLR_RED WHEN {|| .F.}
@ 8,3 DCCHECKBOX  x prompt 'prompt8' PRESENTATION {{ XBP_PP_BGCLR, GRA_CLR_RED }}
@ 9,3 DCCHECKBOX  x prompt 'prompt9' color GRA_CLR_BLACK,GRA_CLR_RED WHEN {|| .F.}
@ 10,3 DCCHECKBOX  x prompt 'prompt10' PRESENTATION {{ XBP_PP_BGCLR, GRA_CLR_RED }} WHEN {|| .F.}

@ 12,1 DCGROUP ogroupbox SIZE 20,14
dcsetparent to ogroupbox
@ 1,3 DCCHECKBOX  x prompt 'prompt1' color GRA_CLR_BLACK,XBPSYSCLR_TRANSPARENT
@ 2,3 DCCHECKBOX  x prompt 'prompt2'
@ 3,3 DCCHECKBOX  x prompt 'prompt3' color GRA_CLR_BLACK,XBPSYSCLR_TRANSPARENT WHEN {|| .F.}
@ 4,3 DCCHECKBOX  x prompt 'prompt4' WHEN {|| .F.}
@ 5,3 DCCHECKBOX  x prompt 'prompt5' PRESENTATION {{ XBP_PP_BGCLR, -255 }} WHEN {|| .F.}
@ 6,3 DCCHECKBOX  x prompt 'prompt6' EVAL {|o| o:SetColorBG(XBPSYSCLR_TRANSPARENT)} WHEN {|| .F.}
@ 7,3 DCCHECKBOX  x prompt 'prompt7' color GRA_CLR_BLACK,GRA_CLR_RED WHEN {|| .F.}
@ 8,3 DCCHECKBOX  x prompt 'prompt8' PRESENTATION {{ XBP_PP_BGCLR, GRA_CLR_RED }}
@ 9,3 DCCHECKBOX  x prompt 'prompt9' color GRA_CLR_BLACK,GRA_CLR_RED WHEN {|| .F.}
@ 10,3 DCCHECKBOX  x prompt 'prompt10' PRESENTATION {{ XBP_PP_BGCLR, GRA_CLR_RED }} WHEN {|| .F.}

dcread gui FIT

return
checkboxtest1-enhanced.xpj.jpg
checkboxtest1-enhanced.xpj.jpg (67.61 KiB) Viewed 17718 times
checkboxtest1-enhanced-notheme.jpg
checkboxtest1-enhanced-notheme.jpg (54.73 KiB) Viewed 17718 times