Pickdate part 2 – a control class in development
Hello,
The new Gradient-function comes with FWH-Version 8.07
There is a Gradient-function in older versions.
before Version 8.07, i created a gradient-brush for
bmp's or backgrounds :
aRect := GETCLIENTRECT( oBmp:hWnd )
nGRADIENT := Gradient( hDC, aRect, nVColor, nBColor, .T. ) // .T. Horizontal
or
nGRADIENT := Gradient( hDC, aRect, nVColor, nBColor, .F. ) // .F. Vertical
oBmp:oBrush := TBrush():New( , nGRADIENT )
FillRect( hDC, aRect, oBmp:oBrush:hBrush )
I do not know, if this can transported to Otto's functions,
because i do not know them in detail for the moment.
Best Regards
Uwe
The new Gradient-function comes with FWH-Version 8.07
There is a Gradient-function in older versions.
before Version 8.07, i created a gradient-brush for
bmp's or backgrounds :
aRect := GETCLIENTRECT( oBmp:hWnd )
nGRADIENT := Gradient( hDC, aRect, nVColor, nBColor, .T. ) // .T. Horizontal
or
nGRADIENT := Gradient( hDC, aRect, nVColor, nBColor, .F. ) // .F. Vertical
oBmp:oBrush := TBrush():New( , nGRADIENT )
FillRect( hDC, aRect, oBmp:oBrush:hBrush )
I do not know, if this can transported to Otto's functions,
because i do not know them in detail for the moment.
Best Regards
Uwe
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.
i work with FW.
If you have any questions about special functions, maybe i can help.
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
GradientFill( hDC, 0, 0, ::nHeight, ::nWidth, { { 1, nRGB( 128, 217, 255 ), nRGB( 54, 147, 255 ) } } )
is functionally equivalent to
Gradient( hDC, { 0, 0, ::nHeight, ::nWidth }, nRGB( 128, 217, 255 ), nRGB( 54, 147, 255 ), .t. )
You may use simple Gradient function if you are using an older version of FWH
is functionally equivalent to
Gradient( hDC, { 0, 0, ::nHeight, ::nWidth }, nRGB( 128, 217, 255 ), nRGB( 54, 147, 255 ), .t. )
You may use simple Gradient function if you are using an older version of FWH
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Otto,
Add these lines in method new:
Those buttons don't use double buffer painting, so they will flicker if the PickDate control is resized.
Add these lines in method new:
Code: Select all
if ! Empty( oWnd:hWnd )
::Create()
oWnd:AddControl( Self )
@ 4.2, 5 BUTTON "<" OF Self SIZE 20, 20 ACTION ::PreviousYear() // new
@ 4.2, 20 BUTTON ">" OF Self SIZE 20, 20 ACTION ::NextYear() // new
else
oWnd:DefControl( Self )
endif
return self
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact: