[Lazarus] TEdit appears empty when text is too long

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Lazarus] TEdit appears empty when text is too long

Free Pascal - Lazarus mailing list
Hi,

Has anybody experienced this problem or might know what is going on here?

At around 5K characters the content of TEdit suddenly appears
empty/blank (visually). The content is correct when retrieved
programmatically. If enough characters are removed (programmatically)
the content will show up again. Changing the font size changes this
limit, where the limit is lower for a larger font size.

It is as if the issue is bound by the visual width of entire text
content, as opposed to just the small visible part.

Tested on Windows 7:
Lazarus 1.4.4 r49931 FPC 2.6.4 i386-win32-win32/win64
Lazarus 1.6.4 r54278 FPC 3.0.2 i386-win32-win32/win64
Lazarus 1.9.0 r54874 FPC 3.0.2 i386-win32-win32/win64

Also tested with Delphi 7, where the limit appeared past 50K characters.

Sample project is attached.

I will appreciate any clues to what's going on here.

Thanks,
Denis

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus

EditTextTooLong.zip (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] TEdit appears empty when text is too long

Free Pascal - Lazarus mailing list
I only say that ATBinHex component cannot draw too long lines (by
DrawTextW? TextOutW?) when API takes more than 4K chars (fixed to using
only small cnt of chars).


On 12.05.2017 02:10, Denis Kozlov via Lazarus wrote:
> width of entire text content, as opposed to just the small visible part.

--
Regards,
Alexey

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] TEdit appears empty when text is too long

Free Pascal - Lazarus mailing list
Thanks. This seems to confirm my theory.


On 12/05/2017 11:15, Alexey via Lazarus wrote:
> I only say that ATBinHex component cannot draw too long lines (by
> DrawTextW? TextOutW?) when API takes more than 4K chars (fixed to
> using only small cnt of chars).
>
>
> On 12.05.2017 02:10, Denis Kozlov via Lazarus wrote:
>> width of entire text content, as opposed to just the small visible part.
>

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Lazarus] TEdit appears empty when text is too long

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list

I have tested Windows API directly using DrawText, TextOut and
ExtTextOut functions - they all suffer from this problem.

The problem is bound by the total width of the drawn text (not just the
small visible portion), where beyond some point it breaks. There appears
to be no feasible workaround. It may be possible to programmatically
break apart long text and draw it in chunks, but that is ugly and only
addresses the symptoms of an unstable problem within Windows platform.

Moving on now...

Denis


On 12/05/2017 00:10, Denis Kozlov wrote:

> Hi,
>
> Has anybody experienced this problem or might know what is going on here?
>
> At around 5K characters the content of TEdit suddenly appears
> empty/blank (visually). The content is correct when retrieved
> programmatically. If enough characters are removed (programmatically)
> the content will show up again. Changing the font size changes this
> limit, where the limit is lower for a larger font size.
>
> It is as if the issue is bound by the visual width of entire text
> content, as opposed to just the small visible part.
>
> Tested on Windows 7:
> Lazarus 1.4.4 r49931 FPC 2.6.4 i386-win32-win32/win64
> Lazarus 1.6.4 r54278 FPC 3.0.2 i386-win32-win32/win64
> Lazarus 1.9.0 r54874 FPC 3.0.2 i386-win32-win32/win64
>
> Also tested with Delphi 7, where the limit appeared past 50K characters.
>
> Sample project is attached.
>
> I will appreciate any clues to what's going on here.
>
> Thanks,
> Denis

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Loading...