Why when i SetBrush to a GET all other receive same brush ?
i want use setbrush distinct the get´s.
someone can help ?
oGet:SetBrush ( daniel )
-
- Posts: 603
- Joined: Sun May 04, 2008 8:44 pm
Re: oGet:SetBrush ( daniel )
I tryed use DrawBitmap( hDc, gBmp, 0, 0 )
it´s Work, more make hidden in Text of Get.

it´s Work, more make hidden in Text of Get.

Code: Select all | Expand
//-----------------------------------------------------------------------//
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
- Daniel Garcia-Gil
- Posts: 2365
- Joined: Wed Nov 02, 2005 11:46 pm
- Location: Isla de Margarita
- Contact:
Re: oGet:SetBrush ( daniel )
Lailton
i'm checking... i'll reply very soon
i'm checking... i'll reply very soon
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
-
- Posts: 603
- Joined: Sun May 04, 2008 8:44 pm
- Daniel Garcia-Gil
- Posts: 2365
- Joined: Wed Nov 02, 2005 11:46 pm
- Location: Isla de Margarita
- Contact:
Re: oGet:SetBrush ( daniel )
Lailton...
Brush Class before create a new brush verifies that new brush not same other.
check: style, color, Bmp File or Bmp Res, but in our samples we not use these, so the brush class "think" is same brush each time
we can use a little trick to solve it...
Brush Class before create a new brush verifies that new brush not same other.
check: style, color, Bmp File or Bmp Res, but in our samples we not use these, so the brush class "think" is same brush each time
we can use a little trick to solve it...
Code: Select all | Expand
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
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Re: oGet:SetBrush ( daniel )
Daniel,
How we can create an get effect as this ?
or

How we can create an get effect as this ?

or

Best Regards, Saludos
Falconi Silvio
Falconi Silvio
- Daniel Garcia-Gil
- Posts: 2365
- Joined: Wed Nov 02, 2005 11:46 pm
- Location: Isla de Margarita
- Contact:
Re: oGet:SetBrush ( daniel )
Hello Silvio
Now we working in Button Skins maybe is ready for this month, after will begin with GET Skins
Now we working in Button Skins maybe is ready for this month, after will begin with GET Skins
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9