Page 1 of 2

Problem with display of Checkbox and Radio

Posted: Fri Aug 27, 2010 3:56 pm
by Gale FORd
I just upgraded FWH and xHarbour.com
I am having a problem with the checkbox and radio controls.
When you tab into one or click on one with the mouse the text portion disappears. When I tab off or click another control the text reappears.
This happens on generic prg's in the samples folder.

This example was using c:\fwh\samples\testchk3.prg

Here is checkbox without focus.
Image

Here is checkbox with focus.
Image

Re: Problem with display of Checkbox and Radio

Posted: Fri Aug 27, 2010 9:22 pm
by Gale FORd
Nobody else is having this problem? I am just using the samples testchk3.prg
Latest FWH and latest published xHarbour.com which is November 2009. I could try the xHarbour.com beta August 2010.

Re: Problem with display of Checkbox and Radio

Posted: Fri Aug 27, 2010 10:27 pm
by Daniel Garcia-Gil
Gale FORd wrote:Nobody else is having this problem? I am just using the samples testchk3.prg
Latest FWH and latest published xHarbour.com which is November 2009. I could try the xHarbour.com beta August 2010.
This bug is already fixed in fivewin 10.7... if you have 10.7 you can download again

Re: Problem with display of Checkbox and Radio

Posted: Sat Aug 28, 2010 9:58 am
by byte-one
The solution, provided in 10.7 is not so good! oDlg:refresh() is strong flickering!!
See also:
http://forums.fivetechsupport.com/viewt ... =3&t=19528

Re: Problem with display of Checkbox and Radio

Posted: Sat Aug 28, 2010 4:31 pm
by Antonio Linares

Re: Problem with display of Checkbox and Radio

Posted: Sat Aug 28, 2010 5:10 pm
by Gale FORd
Sorry I posted a my reply on the other thread. My problem is not with a disabled checkbox. It is when it has focus.

I downloaded and installed again. It did not solve my problem. Reading the thread and looking at control.prg It seems you guys are talking about being related to transparency, disabled, and or themed.

I am just using testchk3.prg in the samples folder. No themes, no .rc, and no transparency.

Re: Problem with display of Checkbox and Radio

Posted: Sat Aug 28, 2010 5:34 pm
by Gale FORd
Ok, I added theme support to my application and it works ok now. If I remove "WindowsXP.Manifest" from my .rc then it does not work correctly.

Re: Problem with display of Checkbox and Radio

Posted: Sat Aug 28, 2010 6:43 pm
by nageswaragunupudi
I am unable to find any problem (without manifest) on Windows 7, both aero and classic themes.
Here is the screenshot with focus on checkbox
Image
Am I missing something?

Re: Problem with display of Checkbox and Radio

Posted: Sat Aug 28, 2010 7:37 pm
by Gale FORd
I don't know. I added theme support to a couple of my applications and it is working now.
Without theme support it acts exactly like I describe. With Checkbox and Radio Controls the text disappears when it is selected (has focus)

Re: Problem with display of Checkbox and Radio

Posted: Tue Aug 31, 2010 5:36 pm
by Taavi
Hi,
I can confirm that the problem exists with latest xharbour builder and FWH 10.8

Taavi

Re: Problem with display of Checkbox and Radio

Posted: Tue Aug 31, 2010 11:28 pm
by ukoenig
Hello,

I have a Poblem, changing the Textcolor of Radio's and Checkboxes inside my Font-preview.
Testing Fonts with different Buttonsizes and Styles, Say, Radio, Combobox and Checkbox.
For Radios and Checkboxes, I cannot define the Texcolor.
I tested different Solutions, but the Text-color is always black. All Color-settings are ignored.
Maybe I have to define the Textcolor in a different Way ?
Also I would like to define the SAY-Background ( optional ) on transparent Dialogs ( Background-color ignored ).

@ 175, 155 RADIO oRadio1 VAR nRadio1 OF oDlg1 PIXEL ;
ITEMS ALLTRIM(cTEXTFONT2), ALLTRIM(cTEXTFONT2), ALLTRIM(cTEXTFONT2) _3D ;
SIZE 60, 15 COLOR BT_COLOR ;
HELPID 100, 101, 102 ;
ON CHANGE MsgBeep()
oRadio1:SetFont( oTextFont )

@ 170, 240 CHECKBOX oChk1 VAR lChk1 PIXEL PROMPT ALLTRIM(cTEXTFONT2) ;
SIZE 60, 20 OF oDlg1 ;
ON CHANGE oChk1:SetText( "New Text" ) COLOR BT_COLOR
oChk1:SetFont( oTextFont )

Image

No Problem, using TSradio from Manuel Mercado :
( Tested on XP and VISTA )

// TSRadio Super Radio and Checkbox
// ------------------------------------------------
@180, 155 SRADIO oRadio1 VAR nRadio1 OF oDlg1 ;
ITEMS aItems ;
SIZE nTXTWIDTH + 20, ( nTXTSIZE * 3 ) + 20 PIXEL ;
FONT oTextFont ;
COLOR BT_COLOR

@ 180, 240 SRADIO oChk1 VAR lChk1 OF oDlg1 ;
ITEMS " " + ALLTRIM(cTEXTFONT2) ;
SIZE nTXTWIDTH + 20, nTXTSIZE PIXEL ;
FONT oTextFont CHECK ; // RAISED WBOX ;
COLOR BT_COLOR

Image

Best Regards
Uwe :roll:

Re: Problem with display of Checkbox and Radio

Posted: Wed Sep 01, 2010 8:28 am
by Taavi
Hi,
seems that adding

function IsAppThemed()
return .F.

fixes this problem for us here.

Best,
Taavi
Taavi wrote:Hi,
I can confirm that the problem exists with latest xharbour builder and FWH 10.8

Taavi

Re: Problem with display of Checkbox and Radio

Posted: Wed Sep 01, 2010 9:19 am
by Antonio Linares
Taavi,

Could you provide a small example to reproduce it ?

Thanks for your feedback :-)

Re: Problem with display of Checkbox and Radio

Posted: Wed Sep 01, 2010 1:36 pm
by Gale FORd
Look to the samples folder and use testchk2.prg.
If you need the code then:

Code: Select all

#include "Fivewin.ch"
FUNCTION MAIN()
    LOCAL oDlg
    LOCAL oChk, lChk := .F., lChk2 := .t.
    DEFINE DIALOG oDlg
    @ 0.7, 1 CHECKBOX oChk VAR lChk OF oDlg COLOR CLR_YELLOW, CLR_GREEN
    @ 2, 1 CHECKBOX lChk2 OF oDlg COLOR CLR_YELLOW, CLR_GREEN
    @ 3, 1 BUTTON "&Close" ACTION oDlg:End()
    ACTIVATE DIALOG oDlg;
             CENTER
RETURN NIL
procedure AppSys  // XBase++ requirement
return 
 
Here are some screen shots.
Image
Image
Image

Re: Problem with display of Checkbox and Radio

Posted: Wed Sep 01, 2010 2:00 pm
by nageswaragunupudi
Mr. Antonio

On Windows 7, this program testchk2.prg works as expected, whether we link with manifest or not, both with classic as well as aero themes.

This problem can be seen on Windows XP only. I experienced similar problems earlier when I was using XP.

On XP there can be any combination of :
1. PC with themes enabled
2. PC with themes disabled.
and
(a) Exe linked with manifest
(b) Exe not linked with manifest
and
(i) DIALOG set as TRANSPARENT
(ii) DIALOG not set as TRANSPARENT

In total there are 8 combinations we need to check before we release a production application.
I confirm having problems with some of these combinations earlier though I am not able to recollect them exactly now.

To resolve this problem, this example need to be tested only on an XP.

Though Windows 7 is fast catching up, we can expect a large number of XPs being used in clients' offices for a long time to come, some of them with themes disabled or enabled. Our controls should perform equally well on all OS.