Richard Chidiak wrote:Antonio
This is a wonderful browse control.
if Fw could do something similar, it would be fantastic
The product is commercial from codejock, i have tested it, the interface is not easy but the result is great
image attached
[img]http://www.cbati.com/codejock.gif
Richard[/img][/list]
#include "FiveWin.ch"
static oWnd
function Main()
DEFINE WINDOW oWnd TITLE "Calendar"
ACTIVATE WINDOW oWnd ;
ON PAINT PaintGrid( hDC )
return nil
function PaintGrid( hDC )
local n, m
local nHeight := ( oWnd:nHeight - 20 ) / 7
local nWidth := ( oWnd:nWidth - 10 ) / 7
local cDay, dDate
for n = 0 to 6
MoveTo( hDC, 0, 20 + n * nHeight )
LineTo( hDC, oWnd:nWidth, 20 + n * nHeight )
next
for n = 1 to 6
MoveTo( hDC, n * nWidth, 0 )
LineTo( hDC, n * nWidth, oWnd:nHeight )
next
for n = 0 to 6
cDay = { "Monday", "Tuesday", "Wednesday", "Thursday",;
"Friday", "Saturday", "Sunday" }[ n + 1 ]
oWnd:Say( 3, 5 + ( n * nWidth ) + ( nWidth / 2 ) - ( GetTextWidth( hDC, cDay ) / 2 ),;
cDay,,,, .T., .T. )
next
dDate = Date() - Day( Date() ) + 1
for n = 0 to 5
for m = 1 to 7
oWnd:Say( 25 + n * nHeight, ( m * nWidth ) - 25,;
AllTrim( Str( Day( dDate ) ) ),;
If( Day( Date() ) == Day( dDate ), CLR_HRED, If( Month( Date() ) == Month( dDate ), CLR_YELLOW, CLR_HGREEN ) ),;
,, .T., .T. )
dDate++
next m
next n
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 60 guests