Adjust Size loop. lazarus / 31-LCL ---------------------------------------------------------------------- taazz · 2015-04-18 12:42 OK I'm getting very annoyed with that problem and to top it all up I'm going to try to port toolbar97 in the near future and I do not want to go through the same problem again especially with the a toolbar component. So which methods do I need to override with empty ones to stop the default layout from working in my components. I want to through away everything lazarus specific and keep only borderspacing and the anchors. If it is not possible to completely remove it what do I have to enable to make it stop propagating the resize outside its controls? If all else fails I'll simple drop any efforts to port anything more complex than a button until this is resolved. ---------------------------------------------------------------------- Blaazen · 2015-04-18 12:56 Recently there was this problem with TControlBar, when both ControlBar and its child was Autosize=True and there was attempt to set child.Align to anything else than alNone or alCustom. Current solution is to force all children to Align=alNone in each (overidden) Resize;. ---------------------------------------------------------------------- taazz · 2015-04-18 13:14 Quote from: Blaazen on April 18, 2015, 02:56:13 pmRecently there was this problem with TControlBar, when both ControlBar and its child was Autosize=True and there was attempt to set child.Align to anything else than alNone or alCustom. Current solution is to force all children to Align=alNone in each (overidden) Resize;. I'll look in to the autosize property I haven't set it my self but I haven't checked the defaults either so you might have a point. Now that you mentioned the align property, if I remember correctly juha already commented in a thread about the coolbar that the alNone has the same "resize loop" problems and only alCustom does not create them but then again I might not remember correctly. I need a TWincontrol based component that does not have any of the resize logic in it and I will build a brand new lcl based on it if I have to, thats how much annoyed I am at this point.  Thank you for the pointers. ---------------------------------------------------------------------- howardpc · 2015-04-18 14:23 I have sometimes found it beneficial to wrap sizing and layout routines between calls to TControl's Code: [Select]DisableAutoSizing;  ... EnableAutoSizing; TWinControl also offers DisableAlign and EnableAlign. I think these are provided mainly for optimization, but they can also be used to turn off unwanted 'auto' resize-related effects for whole chunks of code. ---------------------------------------------------------------------- taazz · 2015-04-18 16:09 thanks howard although I was aware of those didn't use them for some reason although they did not help in this case, its always good to be reminded of my choices.