Congratulations Otto, and the all people that help to obtain this great job
Quique
Congratulations Otto, and the all people that help to obtain this great job
Does this function work with FWH 8.02? I am trying here but there is no GradientFill() function.
Regards,
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
Hello Kleyber,
please delete the lines with GradientFill or comment them.
//GradientFill( hDC, 0, 0, ::nHeight, ::nWidth, { { 1, nRGB( 128, 217, 255 ), nRGB( 54, 147, 255 ) } } )
They are not necessary for the pickdate function.
Regards,
Otto
Uwe,
Thanks for information.
Otto,
Thanks!!
Regards,
Antonio,
Thanks for response. After commenting those lines, the dialog shows all the days in BLACK (foreground and backgroud). Only the SUNDAYS are with the correct color. How can I solve this?
Regards,
Kleyber
Otto ,
in resource test if we ren gradientfill I not see nothing... I see black box
I not have this func
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
Hello Antonio,
How would you suggest to insert controls to navigate the date?
Should the controls be in the new/redefine method and the paint method changed the way,
that the βclearscreenβ: FillRect( hDC, GetClientRect( ::hWnd ), ::oBrush:hBrush )
would not clear the controls?
Regards,
Otto
Otto,
I would place two buttons, one on each side of the year.
They could be TButton, TBtnBmp or TButtonBmp.
We can create them in the new method once the handle of the control pickdate already exists. For Redefine(), Method Initiate() has to be redefined.
Antonio,
local aInfo := ::DispBegin()
::DispEnd( aInfo )
clears the whole screen.
How can I protect the buttons from cleaning?
Thanks in advance
Otto
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 selfThank you, Antonio.
Do you think there is another solution.
The flickering is not very nice. Also if you move the mouse there is a flickering.
Regards,
Otto
Otto,
Class TBtnBmp does use double buffer painting. Lets try with them...
Otto,
This fix is required for Method MouseMove() as we are repainting the control on each mouse move! We should repaint it only when an initial date has been selected:
if ::lMove .and. nDay > 0 .and. nMonth > 0 // to work with valid dates only