TsCheckBox scaleBy() problem – still not Solved

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #50040
    Support
    Keymaster

    I think, it's a standard behaviour?

    I'll check it.

    You can help me if send a test-app

    #50405
    SzakiLaci
    Participant

    Thanks for fixing it (half way…) 🙂

    … just checked in 8.31b — works fine now. Both Autosize True/False !IF! Skinned is Active.

    But problem still exists in non-skinned state. (Realized and Edited apr.10)

    #50661
    SzakiLaci
    Participant
    'Support' wrote:

    I think, it's a standard behaviour?

    I'll check it.

    You can help me if send a test-app

    I was able to finally analyze the problem, and I think I've found what is causing the error ! 😉

    It's the integer-width rounding. About 1 pixel too small after ScaleBy. That's why it's breaking into 2 lines, when it shouldn't.

    Like sCheckBox1.width=77 >> ScaleBy(172,100); >> 132.44 = >> 132px.

    An easy way to test and prevent it, to change ALL TsCheckBox Captions by adding a ' ' space after it. And voala.

    Of course it would be better, if it would calc the correct width 😀

    #59605
    SzakiLaci
    Participant

    This is a duplicate topic of the other

    Same problem still exists after 6 years (at v14.26) .

    László

    PS: why did you delete those pictures from your server?

    #59607
    SzakiLaci
    Participant

    Prepared a demo to test with:

    [attachment=9345:CheckBoxScale.zip]

    As you can see > the problem occures only if:

    – [fsBold]

    – Skinned=false;

    – AutoSize=true;

    So the version 14.26 is better, but still not fully OK.

    – are you maybe using round() at calculating the needed space but div/trunc() at wordwrap ?

    – or maybe not setting style during pre-calc? ( [fsBold] … takes more space ! )

    [attachment=9344:sCheckBox_too_long_autoSize2.jpg]

    #59615
    Support
    Keymaster

    Thank you for the demo, I will check it soon.

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