FWH 9.01 - Nested TGroup in TFolder problem? (SOLVED)

FWH 9.01 - Nested TGroup in TFolder problem? (SOLVED)

Postby Horizon » Wed Jan 28, 2009 1:48 pm

Hi,

I am so confused about using nested TGroup in TFolder.

First of all I use Windows manifest. Without it there is no problem.

My sample Code:
Code: Select all  Expand view
#include "FiveWin.ch"

function Main()

   local oDlg, oFld, oGrp, oGrp1
   
   DEFINE DIALOG oDlg SIZE 400, 300 COLOR "W/B" transparent

   @ 0.5, 1 FOLDER oFld OF oDlg SIZE 188, 138 ;
      PROMPTS "One", "Two", "Three"
   
   @ 2, 3 GROUP oGrp TO 120, 180 PROMPT " 1. Group Text " OF oFld:aDialogs[ 1 ] PIXEL

   @ 10, 10 GROUP oGrp1 TO 70, 100 PROMPT " 2. Group Text " OF oFld:aDialogs[ 1 ] PIXEL
     
   ACTIVATE DIALOG oDlg CENTERED ON INIT oFld:aDialogs[1]:SetColor(, 9425383)

return nil


.rc
Code: Select all  Expand view
1 24 "WindowsXP.Manifest"


with this code screen is below.
Image

But you can see problem that 1. Group left line and bottom lines are missing.

I can fix them deleting TRANSPARENT word in DEFINE DIALOG line. But in this case there is another problem occurs like below. I can not set colors of dialogs in Folder. I don't want to use gradient.

Image

I have solved this problem in 8.11 somehow, but I could not solve in 8.12 and 9.01. I also use xBuild version 4.6 Dated 20081205 17:41:49.

Can anbody give me an advice?

Thanks in advance.
Last edited by Horizon on Thu Jan 29, 2009 11:29 am, edited 1 time in total.
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: FWH 9.01 - Nested TGroup in TFolder problem?

Postby Antonio Linares » Wed Jan 28, 2009 7:20 pm

Hakan,

As a temporary solution please add this function to your code:
Code: Select all  Expand view
function IsAppThemed()

return .F.
regards, saludos

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

Re: FWH 9.01 - Nested TGroup in TFolder problem?

Postby Antonio Linares » Wed Jan 28, 2009 7:46 pm

Hakan,

This seems to be the right fix:

Code: Select all  Expand view
METHOD Colors( hDC ) CLASS TControl

   DEFAULT ::nClrText := GetTextColor( hDC ),;
           ::nClrPane := GetBkColor( hDC ),;
           ::oBrush   := TBrush():New( , ::nClrPane ),;
           ::lTransparent := .f.

   SetTextColor( hDC, ::nClrText )
   SetBkColor( hDC, ::nClrPane )

   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;TGROUP"
               // DrawPBack( ::hWnd,  hDC )
               ParentImage( ::hWnd, hDC )
               if Upper( ::ClassName() ) != "TGROUP"  // NEW !!!
                  SendMessage( ::oWnd:hWnd, WM_ERASEBKGND, hDC, 0 ) // to properly remove/set the dotted rect
               endif   
            endif
         endif
      endif
   else
      if IsAppThemed() .and. Upper( ::ClassName() ) $ "TCHECKBOX;TRADIO;TGROUP"
         DrawPBack( ::hWnd,  hDC )
      endif
   endif

return ::oBrush:hBrush
regards, saludos

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

Re: FWH 9.01 - Nested TGroup in TFolder problem?

Postby Horizon » Thu Jan 29, 2009 8:55 am

Thanks Antonio,

It works OK now with TRANSPARENT.

Will this change work new version of fwh or should I change it every new version?
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: FWH 9.01 - Nested TGroup in TFolder problem? (SOLVED)

Postby Antonio Linares » Thu Jan 29, 2009 2:23 pm

Hakan,

It will be included in next FWH version, or in a new FWH 9.01 build, if we publish a new one (due to fixes, changes, etc.)
regards, saludos

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

Re: FWH 9.01 - Nested TGroup in TFolder problem? (SOLVED)

Postby byte-one » Thu Jan 29, 2009 2:45 pm

Antonio, a similar problem is with checkboxes! If a checkbox change from normal to disable or reverse, the part from left,top of the checkbox-control to the right,bottom corner from the DIALOG and all other controls in this area are are not further visible. But with oDlg:refresh() all the controls are visible again! It seems, this area is overwrite with background ore with windows-backcolor from the checkbox.
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: FWH 9.01 - Nested TGroup in TFolder problem? (SOLVED)

Postby Antonio Linares » Thu Jan 29, 2009 3:55 pm

Günther,

Could you please provide a small and self contained example PRG to reproduce it ? thanks
regards, saludos

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

Re: FWH 9.01 - Nested TGroup in TFolder problem? (SOLVED)

Postby byte-one » Thu Jan 29, 2009 4:06 pm

In this pictures you see also, that the background-color from the folder dialogs are the same as of the Dialog (from 9.01 on).
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=14406

The first picture shows normal dialog!
Image

This picture shows, when i go to other records and the status from the checkbox changes from enable to disable or reverse. In this case, if the checkbox is repainted, then the background from left,top from checkbox to the right,bottom corner of dialog is erased. The text above are disabled by me (not error)!! This is also in normal dialogs.
Image
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: FWH 9.01 - Nested TGroup in TFolder problem? (SOLVED)

Postby byte-one » Thu Feb 05, 2009 11:29 am

Antonio, please show to this problem with enable/disable checkboxes on the fly! Also the background-color from the folder-dialogs are now the same as the parent-dialog. (Should be the windows standard if no brushes are defined)
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 73 guests