Hi, Roger.
I guess, a Get/Set-color-function for checkboxes and groups is needed. If they are placed on the new tabpages (SL1), they/their captions (groups) always appear with the background color returned by GRA_BACKGROUND, and this is NOT the background color of the tabpages (which is white by default). Even if the colors are set for a checkbox (i.e. GRA_CLR_BLACK, GRA_CLR_WHITE) and the checkbox is disabled when the dialog comes up, they have the GRA_BACKGROUND background until they turn to be enabled. BTW, this turns into real sh*t if skins are used (Alaska missed something with AutomationTranslateColor there). This problem appears with DCSAY .. GETs turned into checkboxes with the CHECKGET option aswell.
Tom.
DCCHECKBOX/DCGROUP with SL1
DCCHECKBOX/DCGROUP with SL1
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: DCCHECKBOX/DCGROUP with SL1
Tom -
I agree with you.
I'm seeing the same problem on my Scrabble project.
I'll see what I can do.
Roger
I agree with you.
I'm seeing the same problem on my Scrabble project.
I'll see what I can do.
Roger
The eXpress train is coming - and it has more cars.
Re: DCCHECKBOX/DCGROUP with SL1
This is one of those problems where we need Alaska's help.
I can't find a workaround.
I can't find a workaround.
The eXpress train is coming - and it has more cars.
-
- Posts: 8
- Joined: Wed Feb 03, 2010 1:04 am
Re: DCCHECKBOX/DCGROUP with SL1
Hi Roger,
If you send me a small sample in plain Xbase++ showing the trouble I will add 10 - 12 lines with the workarround. Will be as simple as subclass the parent window and handle the WM_CTLCOLOR... messages ( WM_CTLCOLORBTN in the case of the checkbox)
Regards,
Pablo
If you send me a small sample in plain Xbase++ showing the trouble I will add 10 - 12 lines with the workarround. Will be as simple as subclass the parent window and handle the WM_CTLCOLOR... messages ( WM_CTLCOLORBTN in the case of the checkbox)
Regards,
Pablo
Re: DCCHECKBOX/DCGROUP with SL1
Pablo -
That is very generous of you to offer a fix.
I will send you a small sample soon.
Taking the day off today.
Roger
That is very generous of you to offer a fix.
I will send you a small sample soon.
Taking the day off today.
Roger
The eXpress train is coming - and it has more cars.
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
Re: DCCHECKBOX/DCGROUP with SL1
The background color with themes/SL1/tabpage is the GRA_CLR_WHITE by default, it is the LUNA theme color, it is almost white in some places and slightly darker than white in others.
This is what I use for my DCCHECKBOXES. They are on a DCGROUP that is on a DCSTATIC that has the bgcolor of XBPSYSCLR_TRANSPARENT.
This appears to work properly for me. The same type of problem occurs with color highlights. I had to change it to not repaint in GRA_CLR_BACKGOUND to remove the highlites. That is why Roger added to code to post your own repainting code for this. To allow me to override the standard methodology that does not work with themes.
Cliff
This is what I use for my DCCHECKBOXES. They are on a DCGROUP that is on a DCSTATIC that has the bgcolor of XBPSYSCLR_TRANSPARENT.
Code: Select all
To configure based on whether I want themes or not:
IF m->G_lUseThemeTabPage
m->G_nBGColor := XBPSYSCLR_TRANSPARENT
ELSE
m->G_nBGColor := GRA_CLR_BACKGROUND
ENDIF
Actual DCCHECKBOX:
@ 1,1 DCCHECKBOX PROMPT 'Canada' ;
COLOR {|| LB_CheckBoxColor()}
FUNCTION LB_CheckBoxColor():
FUNCTION LB_CheckBoxColor(lUseTheme)
LOCAL aColors
DEFAULT lUseTheme TO .T.
IF LB_IsThemeActiveTabPage() .AND. lUseThem
aColors := {GRA_CLR_BLACK, m->G_nBGColor} // this is set to XBPSYSCLR_TRANSPARENT if I want themes in use
ELSE
aColors := {GRA_CLR_BLACK,GRA_CLR_BACKGROUN}
ENDIF
RETURN aColors
This appears to work properly for me. The same type of problem occurs with color highlights. I had to change it to not repaint in GRA_CLR_BACKGOUND to remove the highlites. That is why Roger added to code to post your own repainting code for this. To allow me to override the standard methodology that does not work with themes.
Cliff