Recent

Author Topic: Fortes4Lazarus RLMemo, RLDBMemo line end problem  (Read 10134 times)

patyi

  • Full Member
  • ***
  • Posts: 168
Fortes4Lazarus RLMemo, RLDBMemo line end problem
« on: February 17, 2012, 06:35:39 pm »
Hi all !

I'm porting some Delphi programs to Lazarus, and before using QuickReport,
I have problem with LRMemo and RLDBMemo lines is displaying incorrectly when it is
populated in runtime like this :

RLMemo.Lines.Add(StringList.Strings);
or
RLMemo.Lines.Assign(StringList);

It is wrong linebreak is used ? Howe can I solve this ?
Thanks, Patyi

patyi

  • Full Member
  • ***
  • Posts: 168
Re: Fortes4Lazarus RLMemo, RLDBMemo line end problem
« Reply #1 on: February 19, 2012, 04:41:04 pm »
Hi all !

Nobody is using fortes4lazarus or at least RLMemo and RLDBMemo components ?
I'm using it lot with QuickReport on Delphi7, and it is big handicap if I can't get it work ... :'(

Zoran

  • Hero Member
  • *****
  • Posts: 1830
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Fortes4Lazarus RLMemo, RLDBMemo line end problem
« Reply #2 on: February 19, 2012, 07:09:32 pm »
I can't test now, but take a look at AdjustLineBreaks. Maybe you should try
Code: [Select]
RLMemo.Lines.Text := AdjustLineBreaks(StringList.Text).

patyi

  • Full Member
  • ***
  • Posts: 168
Re: Fortes4Lazarus RLMemo, RLDBMemo line end problem
« Reply #3 on: February 19, 2012, 08:47:32 pm »
Hi Zoran !

Thanks for advice, but unfortunately id doesn't work !
Something is wrong with painting text in RLMemo and RLRichText components !
It incorrectly displayed the text typed in design time to ... :o

Zoran

  • Hero Member
  • *****
  • Posts: 1830
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Fortes4Lazarus RLMemo, RLDBMemo line end problem
« Reply #4 on: February 19, 2012, 10:55:09 pm »
Yes, I tested now on just updated and compiled Lazarus from trunk and Fortes from trunk. Kubuntu 11.10.
I can confirm this bug.
I hope Luiz will see this topic, as I don't know where Fortes bugs can be reported.

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 457
Re: Fortes4Lazarus RLMemo, RLDBMemo line end problem
« Reply #5 on: February 20, 2012, 12:23:22 pm »
Hi,

It's carnival here in Brazil and i'm off.

Please, if in two days i did not reply again send me a private message.

patyi

  • Full Member
  • ***
  • Posts: 168
Re: Fortes4Lazarus RLMemo, RLDBMemo line end problem
« Reply #6 on: February 20, 2012, 02:30:45 pm »
Hi Luiz !

Happy carnival !  :D
I wish to bee there to ...  O:-)


LuizAmérico

  • Sr. Member
  • ****
  • Posts: 457
Re: Fortes4Lazarus RLMemo, RLDBMemo line end problem
« Reply #7 on: February 21, 2012, 03:53:49 pm »
Fixed in fortes trunk

patyi

  • Full Member
  • ***
  • Posts: 168
Re: Fortes4Lazarus RLMemo, RLDBMemo line end problem
« Reply #8 on: February 21, 2012, 10:07:21 pm »
Hi Luiz !

Thanks for extra quick repair ! The line break is now OK - solved !

I found another problem : I'm using some kind of tabular data in this memo fields, for example
in price calculations tax specification, and have to use Monospace font with size of 8 or 9.
On report preview is appear perfect, but on printed sheet a font style is lost (looks like used general font of report),
the font size is remain Ok !

Sorry for bothering You in carnival time ...  :D

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 457
Re: Fortes4Lazarus RLMemo, RLDBMemo line end problem
« Reply #9 on: February 22, 2012, 01:13:42 am »
Please add a small example.

Needs to see difference between Windows and Linux. Maybe problem is in Lazarus printing support.

patyi

  • Full Member
  • ***
  • Posts: 168
Re: Fortes4Lazarus RLMemo, RLDBMemo line end problem
« Reply #10 on: February 22, 2012, 09:19:28 am »
Hi Luiz !

Attachment contains a small example ...
How can I load saved report ? it is not so important by now I'm curious ...

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 457
Re: Fortes4Lazarus RLMemo, RLDBMemo line end problem
« Reply #11 on: February 22, 2012, 11:43:39 pm »
It does not work even on windows. I will have to take a deeper look. Please open a report at http://sourceforge.net/tracker/?group_id=270826&atid=1151759 so it's not forgotten

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 457
Re: Fortes4Lazarus RLMemo, RLDBMemo line end problem
« Reply #12 on: February 23, 2012, 03:29:46 am »
I managed to work under windows, just replaced Font.Name from Monospace to Courier New (Courier also does not works)

Unfortunately my printer does not work under linux so i cant test there but at least the pdf filter worked also on linux.

Can you test with other mono fonts?

Also try with other widgetset (QT)


patyi

  • Full Member
  • ***
  • Posts: 168
Re: Fortes4Lazarus RLMemo, RLDBMemo line end problem
« Reply #13 on: February 23, 2012, 09:34:03 am »
I tested it on fresh VBox installation of WinXP SP3, Latest Lazarus, Fpc 2.6.0.
Result of Preview and Printing is OK, with Courier New font, there is nothing to do !

On Linux, Ubuntu 11.04 i386, latest Lazarus svn, Fpc 2.6.0.
Tested it with all possible mono fonts, the result is problematic,
Preview is Ok but Printed result was not correct !

I will try to install some QT Linux (KUbuntu) on my VBox, but suppose the result
will bee the same ...

in attachment is a modified example to easy change the font ... 

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 457
Re: Fortes4Lazarus RLMemo, RLDBMemo line end problem
« Reply #14 on: February 23, 2012, 10:39:15 am »
its not necessary a qt distribution.

Just add libqtpas and change build mode WidgetSet to qt.

See steps here http://wiki.lazarus.freepascal.org/Qt_Interface

 

TinyPortal © 2005-2018