Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread TImage Border issue
Thu, Nov 12 2015 11:33 AMPermanent Link

Uli Becker

When I set the border width of a TImage component to visible and a width
of 2 e.g. and then set Image1.width := 0, Image2.height := 0 (I need
that for animations), I still see a square of 4 pixels. Is that a bug or
by design?

Uli
Thu, Nov 12 2015 11:45 AMPermanent Link

Uli Becker

I just see that it's the same with a TBasicPanel.

Uli
Fri, Nov 13 2015 7:59 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Uli,

<< When I set the border width of a TImage component to visible and a width of 2 e.g. and then set Image1.width := 0, Image2.height := 0 (I need that for animations), I still see a square of 4 pixels. Is that a bug or
by design? >>

It's a weirdness in the browser DOM's box model:

http://stackoverflow.com/questions/11142330/why-does-box-sizing-border-box-still-show-the-border-with-a-width-of-0px

Personally, I think they shouldn't be drawn because they reside in negative space with the border-box model and such content is normally clipped.  But, I may have to adjust the design-time form designer to reflect this weirdness.

Tim Young
Elevate Software
www.elevatesoft.com
Image