I have a small Problem, using Gradient on Get-Fields.
For a new Tool, to support Daniel's new TFolderEx-class,
I can define any Tabs with Background, Styles and different Sizes.
For every GET with different Gradient, I use Daniel's Function from the Forum.
It works, but on Refresh all Gets are changed to the Gradient from the last defined GET.
Maybe something to change ?
- Code: Select all Expand view
FUNCTION GRADGET( oDGet, nMove, nColor1, nColor2 )
LOCAL hBmp, oBrush
LOCAL aColors := { { nMove, nColor1, nColor2 },;
{ nMove, nColor2, nColor1 } }
oDGet:lTransparent = .T.
hBmp = GradientBmp( oDGet, oDGet:nWidth, oDGet:nHeight, aColors )
oBrush = TBrush():New( ) //<==
oBrush:hBrush = CreatePatternBrush( hBmp ) //<==
oDGet:SetBrush( oBrush )
DeleteObject( hBmp )
RETURN NIL
Different Gradient on Gets selected
REFRESH changes all defined Get-Gradients to the last one.
Best Regards
Uwe