Why when i SetBrush to a GET all other receive same brush ?
i want use setbrush distinct the get´s.
someone can help ?
//-----------------------------------------------------------------------//
function filldis( hDC, oGet)
local gBmp
if .not. oGet:lActive //.or. oGet:lReadOnly
gBmp:= GradientBmp( oGet, oGet:nWidth, oGet:nHeight, {{0.50, nrgb(255,208,202), nrgb(255,161,149)},{0.50, nrgb(252,75,70 ), nrgb(247,174,157)}} )
DrawBitmap( hDc, gBmp, 0, 0 )
//DrawMasked( hDc, hPen, 0, 0 ) too no work
/*
i tryed too create xBrush inside this function and SEtBush(xBrush) for oGET more
when make this, all get stay red. :( i want only get disabled...
*/
endif
return nil
function GradGet( _oDlg )
local oControl
local aColors := ARRAY( 3 )
local hBmp, n
local oBrush
aColors [ 1 ] = { { 0.4, nRGB( 231, 240, 244 ), nRGB( 159, 212, 240 ) },;
{ 0.6, nRGB( 126, 188, 224 ), nRGB( 188, 227, 244 ) } }
aColors [ 2 ] = { { 0.4, nRGB( 255, 253, 219 ), nRGB( 255, 231, 144 ) },;
{ 0.6, nRGB( 255, 215, 76 ), nRGB( 255, 231, 153 ) } }
for n = 1 to Len(_oDlg:aControls)
oControl:= _oDlg:aControls[ n ]
if oControl:ClassName() == "TGET"
oControl:lTransparent = .T.
oControl:nTxtStyle = 4
hBmp = GradientBmp( oControl,;
oControl:nWidth,;
oControl:nHeight,;
aColors[ If( n%2 == 0, 1, 2 ) ] )
oBrush = TBrush():New( , n )
oBrush:hBrush = CreatePatternBrush( hBmp )
oControl:SetBrush( oBrush )
DeleteObject( hBmp )
endif
next
return Nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 90 guests