FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Radio and Check Box Prompts disappearing in Transparent Dlgs
Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM
Radio and Check Box Prompts disappearing in Transparent Dlgs
Posted: Sat Nov 04, 2006 02:08 AM
Hello Mr.Antonio

I suspect that there is a bug in FWH 2.8 September + 0.99.1 (Simplex).
When I use TRANSPARENT clause in DIALOGS in WIN98 SE or even
without TRANSPARENT clause in WINXP, the Radio Button prompts and
Check Box prompts are disappearing when the focus is on them as shown
in the following images.

Please advise me the solution.

Regards to you

- Ramesh Babu P

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Radio and Check Box Prompts disappearing in Transparent Dlgs
Posted: Sun Nov 05, 2006 08:01 AM

Ramesh,

Please place the groups definition in the RC before the controls and redefine them in your code, i.e.:

REDEFINE GROUP ID 5 OF oDlg

... redefine controls contained into it

You may review samples\TestFldb.prg as a sample.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM
Radio and Check Box Prompts disappearing in Transparent Dlgs
Posted: Sun Nov 05, 2006 11:12 AM
Hello Mr.Antonio

The result of the samples\TestFldb.prg is below.



Regards to you,

- Ramesh Babu P
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Radio and Check Box Prompts disappearing in Transparent Dlgs
Posted: Sun Nov 05, 2006 11:45 AM

Ramesh,

Then it looks as a themes related issue.

We are going to review it asap, thanks.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Radio and Check Box Prompts disappearing in Transparent Dlgs
Posted: Sun Nov 05, 2006 12:37 PM
Ramesh,

checkboxes get almost fixed with this change in source\classes\control.prg Method Colors():
   if ::lTransparent .and. GetFocus() != ::hWnd

instead of:

   if ::lTransparent

We are still doing research for radios.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM
Radio and Check Box Prompts disappearing in Transparent Dlgs
Posted: Sun Nov 05, 2006 04:13 PM

Hell Mr.Antonio

Thanks for your attention.

With the fix you have suggested in CONTROL.PRG, the check boxes are
displayed properly now.

As far as RADIO buttons are concerned, unlike earlier now only the
prompt of the current RADIO button on which the focus is present
is disappearing.

Kindly suggest me the proper fix as early as possible.

Regards

  • Ramesh Babu P
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Radio and Check Box Prompts disappearing in Transparent Dlgs
Posted: Sun Nov 05, 2006 04:21 PM

Ramesh,

We don't have a quick fix for radios.

It looks as the transparency feature just works properly for radios with XP themed dialogs.

You may disable transparency for radios, but it will not look nice.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM
Radio and Check Box Prompts disappearing in Transparent Dlgs
Posted: Mon Nov 06, 2006 09:54 AM
Dear Mr.Antonio

Here is the fix for METHOD Colors() in CONTROL.PRG for both RADIO
BUTTONS and CHECKBOXES both THEMED AND NON-THEMED situations.

   if ::lTransparent
      SetBkMode( hDC, 1 ) // TRANSPARENT
      if IsAppThemed()
         if ! Empty( ::oBrush:hBitmap )
            SetBrushOrgEx( hDC, nBmpWidth( ::oBrush:hBitmap ) - ::nLeft, nBmpHeight( ::oBrush:hBitmap ) - ::nTop )
            FillRect( hDC, GetClientRect( ::hWnd ), ::oBrush:hBrush )
         else            //  This condition is added by RAMESH BABU P on Nov. 06, 2006
           if Upper( ::ClassName() ) $ "TCHECKBOX;TRADIO"
              DrawPBack( ::hWnd,  hDC )
           endif   
         endif
      endif
   else     
      if IsAppThemed() .and. Upper( ::ClassName() ) $ "TCHECKBOX;TRADIO"
         DrawPBack( ::hWnd,  hDC )
      endif   
   endif


and the restult is :



I have tested in all the situations and found it to be working.

Please have look.

Regards to you

- Ramesh Babu P
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Radio and Check Box Prompts disappearing in Transparent Dlgs
Posted: Mon Nov 06, 2006 10:40 AM

Ramesh,

Excellent! :-)

Many thanks,

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion