Radio and Check Box Prompts disappearing in Transparent Dlgs

Post Reply
User avatar
RAMESHBABU
Posts: 591
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Radio and Check Box Prompts disappearing in Transparent Dlgs

Post by RAMESHBABU »

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

Image
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
User avatar
RAMESHBABU
Posts: 591
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Post by RAMESHBABU »

Hello Mr.Antonio

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

Image

Regards to you,

- Ramesh Babu P
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Ramesh,

Then it looks as a themes related issue.

We are going to review it asap, thanks.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Ramesh,

checkboxes get almost fixed with this change in source\classes\control.prg Method Colors():

Code: Select all

   if ::lTransparent .and. GetFocus() != ::hWnd

instead of:

   if ::lTransparent
We are still doing research for radios.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
RAMESHBABU
Posts: 591
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Post by RAMESHBABU »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
User avatar
RAMESHBABU
Posts: 591
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Post by RAMESHBABU »

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.

Code: Select all



   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 :

Image

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

Please have look.

Regards to you

- Ramesh Babu P
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Ramesh,

Excellent! :-)

Many thanks,
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply