On 11/06/2016 07:08 PM, Jürgen Hestermann via Lazarus wrote:
Am 2016-11-06 um 16:39 schrieb Ondrej Pokorny via Lazarus:
The sentence
"Common mistake: Keep in mind that ClientWidth and ClientHeight can
change even when Width, Height stays the same"
makes me think that the event is not triggered when
*Client*Width/-Height changes
but only when Width/Height changes (why else would there be a "common
mistake"?)
but actually it is triggered in both cases.
The sentence doesn't say anything about when OnResize is triggered so
it doesn't make me think anything about OnResize triggers.

Then I don't know what the text is about at all.
It warns but does not say against what.

It's against thinking that OnResize triggers only when width or/and height is changed. eg. let's assume that you have TCustomControl on form (with scrollbars), when theme is changed it is possible that vscrollbar width is changed from 20 to 22, so TCustomControl clientWidth is changed too since clientRect area is smaller now...OnResize() is triggered too.

zeljko

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to