Radio and Check Box Prompts disappearing in Transparent Dlgs

Radio and Check Box Prompts disappearing in Transparent Dlgs

Postby RAMESHBABU » Sat Nov 04, 2006 2: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

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

Postby Antonio Linares » Sun Nov 05, 2006 8: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby RAMESHBABU » Sun Nov 05, 2006 11:12 am

Hello Mr.Antonio

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

Image

Regards to you,

- Ramesh Babu P
User avatar
RAMESHBABU
 
Posts: 624
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

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

Postby Antonio Linares » Sun Nov 05, 2006 12:37 pm

Ramesh,

checkboxes get almost fixed with this change in source\classes\control.prg Method Colors():
Code: Select all  Expand view
   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
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby RAMESHBABU » Sun Nov 05, 2006 4: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
User avatar
RAMESHBABU
 
Posts: 624
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Postby Antonio Linares » Sun Nov 05, 2006 4: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby RAMESHBABU » Mon Nov 06, 2006 9: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.

Code: Select all  Expand view


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

Postby Antonio Linares » Mon Nov 06, 2006 10:40 am

Ramesh,

Excellent! :-)

Many thanks,
regards, saludos

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: betoncu and 91 guests