FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Problem with display of Checkbox and Radio
Posts: 663
Joined: Mon Dec 05, 2005 11:22 PM
Problem with display of Checkbox and Radio
Posted: Fri Aug 27, 2010 03:56 PM
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.


Here is checkbox with focus.
Posts: 663
Joined: Mon Dec 05, 2005 11:22 PM
Re: Problem with display of Checkbox and Radio
Posted: Fri Aug 27, 2010 09:22 PM

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.

Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Problem with display of Checkbox and Radio
Posted: Fri Aug 27, 2010 10:27 PM
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
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: Problem with display of Checkbox and Radio
Posted: Sat Aug 28, 2010 09:58 AM

The solution, provided in 10.7 is not so good! oDlg:refresh() is strong flickering!!
See also:

viewtopic.php?f=3t=19528

&

Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Problem with display of Checkbox and Radio
Posted: Sat Aug 28, 2010 04:31 PM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 663
Joined: Mon Dec 05, 2005 11:22 PM
Re: Problem with display of Checkbox and Radio
Posted: Sat Aug 28, 2010 05:10 PM

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.

Posts: 663
Joined: Mon Dec 05, 2005 11:22 PM
Re: Problem with display of Checkbox and Radio
Posted: Sat Aug 28, 2010 05:34 PM

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.

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Problem with display of Checkbox and Radio
Posted: Sat Aug 28, 2010 06:43 PM
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

Am I missing something?
Regards



G. N. Rao.

Hyderabad, India
Posts: 663
Joined: Mon Dec 05, 2005 11:22 PM
Re: Problem with display of Checkbox and Radio
Posted: Sat Aug 28, 2010 07:37 PM

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)

Posts: 97
Joined: Mon Nov 21, 2005 10:29 AM
Re: Problem with display of Checkbox and Radio
Posted: Tue Aug 31, 2010 05:36 PM

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

Taavi

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Problem with display of Checkbox and Radio
Posted: Tue Aug 31, 2010 11:28 PM
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 )



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



Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 97
Joined: Mon Nov 21, 2005 10:29 AM
Re: Problem with display of Checkbox and Radio
Posted: Wed Sep 01, 2010 08:28 AM
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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Problem with display of Checkbox and Radio
Posted: Wed Sep 01, 2010 09:19 AM

Taavi,

Could you provide a small example to reproduce it ?

Thanks for your feedback :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 663
Joined: Mon Dec 05, 2005 11:22 PM
Re: Problem with display of Checkbox and Radio
Posted: Wed Sep 01, 2010 01:36 PM
Look to the samples folder and use testchk2.prg.
If you need the code then:
Code (fw): Select all Collapse
#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.


Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Problem with display of Checkbox and Radio
Posted: Wed Sep 01, 2010 02:00 PM

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.

Regards



G. N. Rao.

Hyderabad, India