New line rule changed in TsHTMLLabel?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #37273
    HeDiBo
    Participant

    I think there has been a change in the implementation of TsHTMLLabel.

    Previously, if property UseHTML was True, new lines in the Caption were ignored, only
    would cause a line break. Now also new lines cause a line break. This also breaks my current projects. Unless this was done accidentally.

    What should I do? Look at all the HTML labels I have in my projects, to change their captions or should I wait, because this is a bug?

    This is a picture (at design time) of what happens now:

    [attachment=8082:LineWraps in HTML.JPG]

    I'll have to change all Hints as well (same problem)

    PS: Have a good 2017 for you and your family.

    #56005
    Support
    Keymaster

    Hello, Dick

    This is a mistake, I will fix it very soon.

    Quote:
    PS: Have a good 2017 for you and your family.

    Thank you, you too.

    #56006
    HeDiBo
    Participant
    'Support' wrote:

    Hello, Dick

    This is a mistake, I will fix it very soon.

    I assume the HTMLText procedure in sHtmlParse.pas needs an extra parameter: RealHtml: boolean. If true it would change the procedure as follows:

    Code:
    #$D: if not RealHtml then begin
    if CurPos > LastPos then
    ShowCut(CurPos, LastPos);

    LastPos := CurPos;
    if CurrentRowHeight = 0 then
    CurrentRowHeight := acTextHeight(Bitmap.Canvas, 'Yy');

    NewRow;
    end;

    #$A:
    if not RealHtml then CurX := Area.Left;

    RealHtml would be True if hint and label have the HTMLMode (sAlphaHints) and the UseHtml properties set. If that's the way it should work, I can make a temporary patch.

    #56007
    Support
    Keymaster

    Yes, you can make this changing.

    #56144
    HeDiBo
    Participant

    Thing are OK in 11.25 a3.gif

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.