Page 2 of 3
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Sun Aug 03, 2008 7:05 pm
by quique
Congratulations Otto, and the all people that help to obtain this great job
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Mon Aug 04, 2008 3:01 pm
by Kleyber
Does this function work with FWH 8.02? I am trying here but there is no GradientFill() function.
Regards,
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Mon Aug 04, 2008 4:29 pm
by ukoenig
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
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Mon Aug 04, 2008 4:48 pm
by Otto
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
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Mon Aug 04, 2008 6:04 pm
by Kleyber
Uwe,
Thanks for information.
Otto,
Thanks!!
Regards,
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Mon Aug 04, 2008 7:18 pm
by Kleyber
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
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Mon Aug 04, 2008 9:52 pm
by Silvio
Otto ,
in resource test if we ren gradientfill I not see nothing... I see black box
I not have this func
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Mon Aug 04, 2008 11:10 pm
by nageswaragunupudi
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
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Tue Aug 05, 2008 6:48 am
by Otto
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
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Tue Aug 05, 2008 8:06 am
by Antonio Linares
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.
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Tue Aug 05, 2008 8:47 am
by Otto
Antonio,
local aInfo := ::DispBegin()
::DispEnd( aInfo )
clears the whole screen.
How can I protect the buttons from cleaning?
Thanks in advance
Otto
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Tue Aug 05, 2008 9:28 am
by Antonio Linares
Otto,
Add these lines in method new:
- Code: Select all Expand view
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
Those buttons don't use double buffer painting, so they will flicker if the
PickDate control is resized.
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Tue Aug 05, 2008 10:08 am
by Otto
Thank 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
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Tue Aug 05, 2008 10:32 am
by Antonio Linares
Otto,
Class TBtnBmp does use double buffer painting. Lets try with them...
![Post Post](./styles/prosilver/imageset/icon_post_target.gif)
Posted:
Tue Aug 05, 2008 10:35 am
by Antonio Linares
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