Hi,

It is also easy to be done:
Just replace
code in method rcsLargeCalendar.ArrangeUI
with following code:
Local lcLine as String, ;
    lnDateHeight as Number, ;
    lnDateWidth as Number, ;
    lnHalfWidth as Number, ;
    lnHeight as Number, ;
    lnIndex as Number, ;
    lnLine as Number, ;
    loControl as Object, ;
    loLine as Object

If This.Height < 87 Or This.Width < 87
    Return
Endif

lnDateWidth = (This.Width - 14) / 7
lnDateHeight = (This.Height - 86) / 6
lnHeight = This.Height - 86

* Re-arrange the vertical lines

*!*    FOR lnIndex = 0 TO 7
*!*        lcLine = [This.linDate] + TRANSFORM(m.lnIndex + 1)
*!*        *loLine = EVALUATE("this.linDate1"+TRANSFORM(m.lnIndex +1)

*!*        lcEval = m.lcLine + [.Left = (m.lnIndex * m.lnDateWidth) + 6 ]
*!*        &lcEval
*!*        lcEval = m.lcLine + ".Height = m.lnHeight"
*!*        &lcEval
*!*    ENDFOR

*!*    * Re-arrange the horizontal lines
*!*    FOR lnIndex = 1 TO 6
*!*        lcLine = [This.linDateH] + TRANSFORM(m.lnIndex)
*!*        lcEval = m.lcLine + [.Top = ] + TRANSFORM((m.lnDateHeight *
m.lnIndex) + 51)
*!*        &lcEval
*!*        lcEval = m.lcLine + [.Width = ] + TRANSFORM(This.Width - 14)
*!*        &lcEval
*!*    ENDFOR

*** Koen Piller 10-3-2018
*Rearrange the vertical lines
For lnIndex = 0 To 7
    lcLine = [This.linDate]+Transform(m.lnIndex+1)
    lcLine = STRTRAN(lcLine,"THIS",'',1,1,1)
    loLine = EVALUATE("This" + lcLine)
    loLine.Left = (m.lnIndex * m.lnDateWidth) + 6
    loLine.Height = m.lnHeight
Endfor
*Rearrange the horizontal lines
For lnIndex = 1 To 6
    lcLine = [This.linDateH] + Transform(m.lnIndex)
    lcLine = STRTRAN(m.lcLine,"THIS",'',1,1,1)
    loLine = Evaluate("This" + m.lcLine)
    loLine.Top = (m.lnDateHeight * m.lnIndex) + 33
    loLine.Width = This.Width - 14
ENDFOR
***

This.Line1.Width = This.Width - 14
This.Line2.Width = This.Width - 14

This.shpBackground.Width = This.Width - 4
This.shpBackground.Height = This.Height - 34

This.shpMonthBackground.Width = This.Width - 14
This.shpMonthBackground.Height = m.lnHeight

This.Line2.Top = This.shpMonthBackground.Top +
This.shpMonthBackground.Height

This.shpControlBackground.Width = This.Width - 2

* Adjust the day of the week
lnHalfWidth = m.lnDateWidth / 2
This.rcsWeekdays1.Width = This.Width - 4
This.rcsWeekdays1.lblSun.Left = (m.lnDateWidth * 1) - m.lnHalfWidth -
(This.rcsWeekdays1.lblSun.Width / 2) + 4
This.rcsWeekdays1.lblMon.Left = (m.lnDateWidth * 2) - m.lnHalfWidth -
(This.rcsWeekdays1.lblMon.Width / 2) + 4
This.rcsWeekdays1.lblTue.Left = (m.lnDateWidth * 3) - m.lnHalfWidth -
(This.rcsWeekdays1.lblTue.Width / 2) + 4
This.rcsWeekdays1.lblWed.Left = (m.lnDateWidth * 4) - m.lnHalfWidth -
(This.rcsWeekdays1.lblWed.Width / 2) + 4
This.rcsWeekdays1.lblThu.Left = (m.lnDateWidth * 5) - m.lnHalfWidth -
(This.rcsWeekdays1.lblThu.Width / 2) + 4
This.rcsWeekdays1.lblFri.Left = (m.lnDateWidth * 6) - m.lnHalfWidth -
(This.rcsWeekdays1.lblFri.Width / 2) + 4
This.rcsWeekdays1.lblSat.Left = (m.lnDateWidth * 7) - m.lnHalfWidth -
(This.rcsWeekdays1.lblSat.Width / 2) + 4

This.txtMonthYear.Left = (This.Width - This.txtMonthYear.Width) / 2
This.Shape1.Left = (This.Width - This.Shape1.Width) / 2
This.rcsLeftButton1.Left = This.Shape1.Left - 26
This.rcsRightButton1.Left = This.Shape1.Left + This.Shape1.Width + 2

This.rcsCircled1.Top = This.Height - 23
This.lblToday.Top = This.Height - 22
This.txtToday.Top = This.Height - 24

* Now we have to re-position the dates themselves
For Each loControl In This.Controls
    If Lower(Left(m.loControl.Name, 7)) = "rcsdate"
        If m.loControl.BaseClass = "Label"
            This.ConfigureDateLabel(m.loControl)
            loControl.PositionEvents()

            If loControl.dDate = Date()
                This.CircleMe(m.loControl,
This.IsDateSelected(m.loControl.dDate))
            Endif
        Endif
    Endif
Endfor

and you are done.

Regards,

Koen

2018-03-10 3:04 GMT+01:00 Koen Piller <koen.pil...@gmail.com>:

> Hi,
> Paul's 100% VFP Calendar class with a minor bug fix on form.
> Testlargecalender zip would like to attach however which I cannot do here
> due to seq.reasons. How would you like me to transfer?
> Regards,
> Koen
>
> 2018-03-05 23:04 GMT+01:00 Ted Roche <tedro...@gmail.com>:
>
>> It seems like everyone has to write one once. Most frameworks I've
>> worked have have one built in somewhere.
>>
>> There's one in the leafe.com downloads at https://leafe.com/dls/vfp --
>> search for calendar
>>
>> There's one posted on the Fox wiki:
>> http://fox.wikis.com/wc.dll?Wiki~CalendarControl~SoftwareEng
>>
>> Or, you can just write your own that works the way you want it to.
>> It's fun, it's easy, it's something you know the rules for, and it
>> will work exactly the way you want it to. Eventually.
>>
>>
>> On Mon, Mar 5, 2018 at 4:37 PM, Chris Davis <chr...@actongate.co.uk>
>> wrote:
>> >
>> >
>> > Get Outlook for iOS<https://aka.ms/o0ukef>
>> > ________________________________
>> > From: Chris Davis
>> > Sent: Sunday, March 4, 2018 3:01:05 PM
>> > To: profox@leafe.com
>> > Subject: Date / Date Time Picker Class
>> >
>> > Can anyone recommend one which just works and is 100% VFP?
>> >
>> > I have tried the one from Sweet Potato but this seems to have a READ
>> EVENTS in the code somewhere which stops the calendar appearing on first
>> click.
>> >
>> > I have also tried the ones in FoxyClasses but these are not 100% VFP
>> and do some odd things when bound to a field in a view.
>> >
>> > Thanks
>> >
>> > Chris.
>> >
>> >
>> > --- StripMime Report -- processed MIME parts ---
>> > multipart/alternative
>> >   text/plain (text body -- kept)
>> >   text/html
>> > ---
>> >
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/cacuu1stb7c8fub6b8hqlfmfrgkjnvctyay0r8texlpsxchu...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to