FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour browse control
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
browse control
Posted: Fri Oct 19, 2007 08:25 PM
Tim,

Here you have a screenshot:
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
browse control
Posted: Fri Oct 19, 2007 09:41 PM

... and mousesupport
Regards,
Otto

include "FiveWin.ch"

static oWnd
static nHeight
static nWidth
static aDate := {}

function Main()

DEFINE WINDOW oWnd TITLE "Calendar"

aadd(aDate,{date(),date(),date(),date(),date(),date(),date()})
aadd(aDate,{date(),date(),date(),date(),date(),date(),date()})
aadd(aDate,{date(),date(),date(),date(),date(),date(),date()})
aadd(aDate,{date(),date(),date(),date(),date(),date(),date()})
aadd(aDate,{date(),date(),date(),date(),date(),date(),date()})
aadd(aDate,{date(),date(),date(),date(),date(),date(),date()})

oWnd:bLClicked    := { |y,x,flags |f_info(x,y) }

ACTIVATE WINDOW oWnd ;
    ON PAINT PaintGrid( hDC )

return nil

function PaintGrid( hDC )
local n, m
local n1

local cDay, dDate

nHeight := ( oWnd:nHeight - 20 ) / 7
nWidth := ( oWnd:nWidth - 10 ) / 7



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                              //rows
    for m = 1 to 7                          //cols
        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. )

        n1:=n+1
        aDate[n1,m] := dDate

        dDate++
    next m
next n

return nil

func f_info(x,y)

local n,m
m:=INT(x/nWidth)+1

n:=INT((y-20)/ nHeight)+1

msginfo(dtoc(aDate[n,m]))

return nil

Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Background
Posted: Fri Oct 19, 2007 10:17 PM

I was getting a white background ... added a color and it shows up.

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
browse control
Posted: Sun Oct 21, 2007 02:50 PM
Dear All,

I used to do as the same idea in FW 16bits. I've used twbrowse for each day record. If it can help, I will upload it.
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
browse control
Posted: Sun Oct 21, 2007 06:59 PM

Dutch,

It looks really nice :-)

I am sure many users will appreciate if you want to share its source code. You may use www.rapidshare.com or similar to upload it, thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
browse control
Posted: Mon Oct 22, 2007 03:17 AM
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
browse control
Posted: Mon Oct 22, 2007 06:25 AM
This is another class


Regards Maurizio
www.nipeservice.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
browse control
Posted: Mon Oct 22, 2007 09:31 AM

Dutch,

Thanks! :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 581
Joined: Tue Oct 11, 2005 11:28 AM
browse control
Posted: Mon Oct 22, 2007 12:15 PM
This is another class


Hi, Maurizio,

Are you selling this class or are you sharing this class with all of us? I'm really interested on it.

Regards
Kleyber Derick



FWH / xHb / xDevStudio / SQLLIB
Posts: 30
Joined: Fri Oct 07, 2005 06:58 AM
browse control
Posted: Thu Jan 31, 2008 11:15 AM
Maurizio wrote:This is another class


Regards Maurizio
www.nipeservice.com


Hi Maurizio,

any news about this class?

Regards
Gianni

Continue the discussion