Tgroup not transparent in w10

Tgroup not transparent in w10

Postby Silvio.Falconi » Thu Nov 15, 2018 10:09 pm

I add the feature for Tgroup created by Cristobal Navarro ( http://forums.fivetechsupport.com/viewtopic.php?f=3&t=36216&p=215958&hilit=tgroup#p215958)

on Folder Class I not Have transparent of the Label as you can see here

Image

Code: Select all  Expand view
 @ 0, 4 GROUP oGrp[1] TO  55, 240 Label "Application Profile" OF oFld:aDialogs[1] PIXEL FONT oFont TRANSPARENT COLOR Rgb( 32, 32, 32 ), CLR_WHITE
     
 oGrp[1]:nClrBorder  := CLR_BLUE


Any solution please ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Tgroup not transparent in w10

Postby ukoenig » Fri Nov 16, 2018 8:17 pm

Silvio,

tested on different brushes ( Image, Gradient, Color )

Image

...
ACTIVATE DIALOG oDlg ;
ON INIT ( DLG_BACK( oDlg, nDStyle, nColor1, nColor2, lDirect, nGrdPos, nCGrdPos, cBrush, cImage ), ;
FLD_BACK( oFld, nTColor, nColor1, nColor2, lDirect, nGrdPos, nCGrdPos, cBrush, cImage ) )


The different folder-brush tests

Code: Select all  Expand view

// --------  FOLDER - Backgrounds ---------------

FUNCTION FLD_BACK( oFld, nTColor, nColor1, nColor2, lDirect, nGrdPos, nCGrdPos, cBrush, cImage )
LOCAL nStyle, oFDlg, hDC, oBrush, oImage, nRow := 0, nCol := 0, lFound := .T.
LOCAL aGrad, nCTop, nCLeft, oImg
LOCAL aRect := GETCLIENTRECT( oFld:hWnd )

FOR nStyle := 1 to Len( oFld:aDialogs )
    oFDlg := oFld:aDialogs[ nStyle ]
    hDC = CreateCompatibleDC( oFDlg:GetDC() )

    IF nStyle = 1 // COLOR
        DEFINE BRUSH oBrush COLOR  nColor1
    ELSEIF nStyle = 2 // GRADIENT
        aGrad := { { nGrdPos, nColor1, nColor2 }, { nGrdPos, nColor2, nColor1 } }
        IF lDirect = .T.
            DEFINE BRUSH oBrush GRADIENT aGrad STYLE  "HORIZONTAL"
        ELSE
            DEFINE BRUSH oBrush GRADIENT aGrad STYLE  "VERTICAL"
        ENDIF
    ELSEIF nStyle = 3 // GRADIENT diagonal
        hDC = CreateCompatibleDC( oDlg:GetDC() )
        hBmp = CreateCompatibleBitMap( oDlg:hDC, aRect[4], aRect[3] )
        hBmpOld = SelectObject( hDC, hBmp )
        DIAGGRADFILL( hDC, 0, 0, aRect[3], aRect[4], ;
                     { { 0, nColor2, nColor2 }, { 0, nColor2, nColor2 }, ;
                       { nGrdPos, nColor1, nColor2 }, ;
                       { nGrdPos, nColor2, nColor1 }, ;
                       { 1, nColor1, nColor1 }, { 1, nColor1, nColor1 } }, lDirect )    
        oBrush := TBrush():New( ,,,, hBmp )
        oBrush:Cargo  := aGrad
        SelectObject( hDC, hBmpOld )
        ReleaseDC(hDC)
    ELSEIF nStyle = 4 // GRADIENT circle
        oBrush := TBrush():New()
        IF nCGrdPos = 1 // bottom / right
            nOffX := nGrdPos * ( aRect[4] / 2 )
            nOffY := nGrdPos * ( aRect[3] / 2 )
        ENDIF
        IF nCGrdPos = 2 // top / left
            nOffX := - nGrdPos * ( aRect[4] / 2 )
            nOffY := - nGrdPos * ( aRect[3] / 2 )
        ENDIF
        IF nCGrdPos = 3 // bottom / left
            nOffX := - nGrdPos * ( aRect[4] / 2 )
            nOffY :=  nGrdPos * ( aRect[3] / 2 )
        ENDIF
        IF nCGrdPos = 4 // top / right
            nOffX :=  nGrdPos * ( aRect[4] / 2 )
            nOffY := - nGrdPos * ( aRect[3] / 2 )
        ENDIF
        DeleteObject( oBrush:hBrush )
        oBrush:hBrush = CircleGradient( 0, { 0, 0, aRect[3], aRect[4] } , nColor1, nColor2, nOffX, nOffY, 1 )
    ELSEIF nStyle = 5 // BMP-brush
        IF FILE( cBrush )
            DEFINE BRUSH oBrush FILE cBrush
        ELSE
            IF !EMPTY(cBrush)
                MsgAlert( "File  : " + cBrush + CRLF + ;
                           "does not exist" + CRLF + ;
                           "to create BMP-brush !", "ATTENTION" )
                lFound := .F.
            ENDIF
        ENDIF
    ELSEIF nStyle = 6 // Image ADJUSTED
        IF FILE( cImage )
            DEFINE IMAGE oImage FILE cImage
            oBrush := TBrush():new( ,,,, ResizeBmp( oImage:hBitmap, aRect[4], aRect[3], .F. ) )
            oImage:End()
        ELSE
            IF !EMPTY(cImage)
                MsgAlert( "File  : " + cImage + CRLF + ;
                           "does not exist" + CRLF + ;
                           "to create IMAGE-background !", "ATTENTION" )
                lFound := .F.
            ENDIF
        ENDIF
    ENDIF
    IF lFound = .T.
        oFDlg:SetBrush( oBrush )
        RELEASE BRUSH oBrush
    ENDIF
    AEVAL( oFDlg:aControls, { | oCtl | oCtl:SetColor( nTColor, ) } )
NEXT

RETURN( NIL )
 


regards
Uwe :D
Last edited by ukoenig on Fri Nov 16, 2018 9:39 pm, edited 1 time in total.
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Tgroup not transparent in w10

Postby Silvio.Falconi » Fri Nov 16, 2018 8:27 pm

Uwe,
on your picture I saw you use FOLDEREX CLASS

but I askeD FOLDER NORMAL
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Tgroup not transparent in w10

Postby ukoenig » Fri Nov 16, 2018 9:10 pm

Silvio,

There seems to be a problem with Bordercolor
it is DISABLED in new FWH-release class GROUP
It would be nice to have a pensize as well.

/*
* UNDER TESTING
*
*
METHOD Paint() CLASS TGroup


oGrp[1]:nClrBorder := CLR_BLUE :x

//#define CNL //22/10/2018
CLASS TGroup FROM TControl
#ifdef CNL
DATA nClrBorder // 15/10/2018 CNL
#endif

Image

regards
Uwe :x
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 112 guests