Recent

Author Topic: Frame Based Calendar.  (Read 16938 times)

KpjComp

  • Hero Member
  • *****
  • Posts: 680
Re: Frame Based Calendar.
« Reply #15 on: July 28, 2012, 03:40:10 pm »
Quote
could have used also WideCharToMultiByte with CP_UTF8 instead of re-writing UnicodeToUtf8.
That's an idea, not tried it I'll give it a go.   But it's still strange why the UnicodeToUtf8 doesn't appears to work.
I'm not even sure it's the UnitcodeToUTF8 that's the problem, but a bit deeper down with unicodestring type, as while I was tracing the first character decoded a proper 2 byte widechar, but the next char for some reason only decoded 1 byte.  What I'll do is create a simple demo for Dev's to have a look at.  I think I might be able to demo this behavior without having to change your locale.

@Avishai, Don't worry as this exercise appears to be exposing some issues with FPC/Lazarus, so I believe it will benefit everyone if we can track down what's happening.

Quote
(Translation: Day 1, Day 2, Day 3)
I'm using what windows gives, I've maybe used the wrong date format.

I'll be enhancing the Event so that more customization can be done, you will need this feature anyway with having Hebrew Calendar on English Login.

picstart

  • Full Member
  • ***
  • Posts: 236
Re: Frame Based Calendar.
« Reply #16 on: July 28, 2012, 04:02:47 pm »
IDE error when loading *.lpi
Bombs under windows 7 pro 32  lazarus 9.30.4 FPC 2.6

Error reading fMainCal.ParentBiDmode unknown property stream psition 1179

Avishai

  • Hero Member
  • *****
  • Posts: 1021
Re: Frame Based Calendar.
« Reply #17 on: July 28, 2012, 09:30:32 pm »
@KpjComp, you have used the right date format.  I only mentioned the translation because I thought you might be curious about what the text means :)  It also explains why our week starts on Sunday.  It would be strange if it started with 'Day 2' and ended with 'Day 1'.
Lazarus Trunk / fpc 2.6.2 / Win32

KpjComp

  • Hero Member
  • *****
  • Posts: 680
Re: Frame Based Calendar.
« Reply #18 on: July 30, 2012, 01:22:36 pm »
Quote
IDE error when loading *.lpi

It's just trying to stream a property your version of Lazarus does not have.   If you view the Lfm in text mode you can delete this.  Alternatively download the modified version below as I've taken that property out.

Quote
because I thought you might be curious

Yes, it's nice to know.  I've learnt a few things about Hebrew & RightToLeft.

I've updated the Calendar with more customizations, also re-factored a little bit too.  All text is now customizable so you can have a Hebrew Calendar on a English login.

Also figured out the problem I was having with UnicodeToUtf8, it was just a Character length issue.   Ideally though, date format settings in Lazarus want making into UTF8, this shouldn't cause much of a problem as it's currently CodePaged/Ansi.

KpjComp

  • Hero Member
  • *****
  • Posts: 680
Re: Frame Based Calendar.
« Reply #19 on: July 30, 2012, 06:14:09 pm »
Update to include a yearly calendar.


Avishai

  • Hero Member
  • *****
  • Posts: 1021
Re: Frame Based Calendar.
« Reply #20 on: July 30, 2012, 06:28:41 pm »
That's impressive. :)  I tried using the 'Next Arrow' to see what would happen when it went from Dec. to Jan. expecting a problem, but it switched to the next year just fine.  About the only thing I can think of would be to add a 'Today' Label to reset the date to the current date similar to TCalendar.  Nice piece of work. :)
Lazarus Trunk / fpc 2.6.2 / Win32

gjpneac

  • New Member
  • *
  • Posts: 16
Re: Frame Based Calendar.
« Reply #21 on: August 01, 2012, 01:15:08 am »
Yes, that's very impressive.

Maybe it would be necessary to propose the replacement of Tcalendar by your work ?

Because Tcalendar works badly since a long time and it was indicated :
http://www.lazarus.freepascal.org/index.php/topic,11668.msg58651.html#msg58651

Because the widget of the OS is not in question as shows it the test which I realized. We would like that whole Lazarus has this quality.
Bravo for this work. Regards

JD

  • Hero Member
  • *****
  • Posts: 1849
Re: Frame Based Calendar.
« Reply #22 on: August 09, 2012, 02:55:16 pm »
Please note this isn't a Component as such, but kind of acts like one.  The advantage is you can just drop into your existing project without having to register a new set of Components.

Thanks for all your good work. I'd like to try this. How do I add this to a panel or a tabbed paged control on a form?

Thanks,

JD
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

KpjComp

  • Hero Member
  • *****
  • Posts: 680
Re: Frame Based Calendar.
« Reply #23 on: August 11, 2012, 06:24:15 pm »
Hi JD,

If you add the uCalendar unit to your project, from the standard toolbar you should see TFrame, click on this and it should allow you to add from this.

 

TinyPortal © 2005-2018