[Lazarus] WordWrap in TLabel

Martin lazarus at mfriebe.de
Sat Sep 14 16:41:34 CEST 2013


On 14/09/2013 15:37, Jürgen Hestermann wrote:
> Am 2013-09-14 16:19, schrieb Martin:
>> See
>> function TCustomLabel.CalcFittingFontHeight(const TheText: string;
>>   MaxWidth, MaxHeight: Integer;
>>   var FontHeight, NeededWidth, NeededHeight: integer): Boolean;
>> A flag is given to DrawText
>> You can look up DrawText in each widgetset, it may exist with and 
>> without themes...
>> Best to hit it in the debugger, and see where it goes.
>
> I already stepped through everything with the debugger but
> couldn't see how and where the text is splitted into lines.

Possible tat on some OS, it si done by the OS itself.

IIRC on gtk, there is something in the WS. But others I do not know.

>
>> What exactly do you want to change?
>> IMHO it works very well, even with auto-sizing, BUT you need to 
>> anchor left and right to other controls
> If the text contains no spaces it is not wrapped at all.
> I want to change this and split the text in all
> situations (independend from the content of the text).

Ah. No Idea.




More information about the Lazarus mailing list