Recent

Author Topic: Cannot resize TCalendar  (Read 16253 times)

Avishai

  • Hero Member
  • *****
  • Posts: 1021
Re: Cannot resize TCalendar
« Reply #15 on: August 26, 2012, 12:14:37 am »
Give me a few minutes and I'll see if I can show you what it should be for BiDiMode:= RightToLeft.
Lazarus Trunk / fpc 2.6.2 / Win32

Avishai

  • Hero Member
  • *****
  • Posts: 1021
Re: Cannot resize TCalendar
« Reply #16 on: August 26, 2012, 12:23:42 am »
OK.  This is TCalendar made RightToLeft by mirroring.  But I have to turn Themes off to get this.  Otherwise, the whole TForm.Canvas is corrupted and can not be used.  Obviously this is under Windows OS.
Lazarus Trunk / fpc 2.6.2 / Win32

Avishai

  • Hero Member
  • *****
  • Posts: 1021
Re: Cannot resize TCalendar
« Reply #17 on: August 26, 2012, 12:26:26 am »
I could show it to you in Hebrew, but I doubt it it be any clearer.  :)
Lazarus Trunk / fpc 2.6.2 / Win32

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: Cannot resize TCalendar
« Reply #18 on: August 26, 2012, 12:27:40 am »
Quote
I've had some difficulty putting it on a form.

In what way?, if you add the units to your project and then click on the TFrame on the standard palette, you should get a dialog for selecting.   Btw.  Don't do it from the Components Search, inserting a TFrame from here doesn't pop up the dialog, looks like a bug in Lazarus.

It didn't work. I attach a screenshot to show you the problem I had.
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: Cannot resize TCalendar
« Reply #19 on: August 26, 2012, 12:40:25 am »
Quote
It didn't work. I attach a screenshot to show you the problem I had.

It looks like you haven't added the units to your project, you can't just include the units in the uses clause, you need to let the project know about these files too. 

Go to Project / Project Inspector and see if the Calendar units are there.

KpjComp

  • Hero Member
  • *****
  • Posts: 680
Re: Cannot resize TCalendar
« Reply #20 on: August 26, 2012, 12:44:04 am »
Quote
I hope you're doing well.

Not too bad, was on a Holiday a couple of weeks ago, had no internet while there.  Annoyingly the site had Wifi but for internal use only.   >:(    And of course get back to work and a bit of catching up to do..

Avishai

  • Hero Member
  • *****
  • Posts: 1021
Re: Cannot resize TCalendar
« Reply #21 on: August 26, 2012, 12:49:44 am »
Oy!  No Internet!?  :o  Where the hell did you go!?  Even Mars has Internet!  For people that live on the Net, that's "cruel and unusual punishment!"
Lazarus Trunk / fpc 2.6.2 / Win32

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: Cannot resize TCalendar
« Reply #22 on: August 26, 2012, 12:52:40 am »
Even Mars has Internet!
Where can I buy a ticket to go there?  :D
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

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: Cannot resize TCalendar
« Reply #23 on: August 26, 2012, 12:53:27 am »
Quote
It didn't work. I attach a screenshot to show you the problem I had.

It looks like you haven't added the units to your project, you can't just include the units in the uses clause, you need to let the project know about these files too. 

Go to Project / Project Inspector and see if the Calendar units are there.

The Calendar units are there, see the screenshot below:
« Last Edit: August 26, 2012, 07:40:50 am by 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

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Cannot resize TCalendar
« Reply #24 on: August 26, 2012, 12:54:30 am »
OK.  This is TCalendar made RightToLeft by mirroring.  But I have to turn Themes off to get this.  Otherwise, the whole TForm.Canvas is corrupted and can not be used.  Obviously this is under Windows OS.

Yes, that looks like what I expected. If someone is interested in adding support, I would just publish BiDiMode and ParentBiDiMode properties in TOvcCalendar rather than adding to the list of Options.

Note that on Mac the TCalendar doesn't look much like that in style - it's, uh, crude is probably a polite way of putting it. See attachment - TCalendar is on left, TOvcCalendar is on right (with its "Today" button to jump back to today).

Thanks.

-Phil



Avishai

  • Hero Member
  • *****
  • Posts: 1021
Re: Cannot resize TCalendar
« Reply #25 on: August 26, 2012, 01:05:09 am »
Yes, you are being overly polite :)  It doesn't look quite as bad with Themes turned on, but still...  TCalendar is a piece of &$%^.  And Themes make it impossible to use when mirrored.  It's just a black rectangle.

I would love to try TOvcCalendar but I'm stuck with Windows64, so I haven't downloaded it.
« Last Edit: August 26, 2012, 01:47:40 am by Avishai »
Lazarus Trunk / fpc 2.6.2 / Win32

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Cannot resize TCalendar
« Reply #26 on: August 26, 2012, 01:08:15 am »
I would love to try TOvcCalendar but I'm stuck with Windows64, so I haven't downloaded it.

On Mac, I'm limited to 32-bits because of its dependence on Carbon. I don't recall exactly how I ported THtmlPort to 64-bits - maybe I just made the changes and somebody tested.

Thanks.

-Phil

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: Cannot resize TCalendar
« Reply #27 on: August 26, 2012, 07:43:05 am »
@KpjComp

I can send a test project to show you what I did so you can try it on your computer. I just could not get the frame based calender to work.  :(
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: Cannot resize TCalendar
« Reply #28 on: August 26, 2012, 12:27:11 pm »
Hi @JD, looking at your screenshot it looks like you didn't add the LFM files too.
eg. ->

edit: I'm not sure if that's your problem, if you want you could post a test project.
The only only thing I noised is the the files were not in the same directory as your project, not sure if this is an issue with Frames or not.
« Last Edit: August 26, 2012, 12:29:35 pm by KpjComp »

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: Cannot resize TCalendar
« Reply #29 on: August 26, 2012, 03:20:05 pm »
I put the lfm files in the same directory as the project and I still can't get it to work.

Here's the screenshot.
« Last Edit: August 26, 2012, 03:22:57 pm by 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

 

TinyPortal © 2005-2018