[solved] How to override the caption getter & setter lazarus / 31-LCL ---------------------------------------------------------------------- Joanna · 2023-11-27 07:15 Hi everyone, I’m making a customized flowpanel like this Tmyflowpanel = class(tflowpanel) How do I override the getcaption and setcaption methods for caption property it seems that it is declared in control like this property Caption: TCaption read GetText write SetText stored IsCaptionStored; It also seems to use methods called Function realgettext and Procedure realsettext. I’m not sure why there are so many different names ---------------------------------------------------------------------- Bart · 2023-11-27 09:47 You should override RealGetText and RealSetText. Bart ---------------------------------------------------------------------- Joanna · 2023-11-27 13:11 Thanks for the  clarification. Another thing that I don't understand is I'm trying to have space between the controls in the flowpanel using childsizing and none of the things seem to have any effect. so far I've tried Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   ChildSizing.TopBottomSpacing := 5;  ChildSizing.VerticalSpacing := 5;  ChildSizing.HorizontalSpacing := 5;  ChildSizing.LeftRightSpacing := 10; the controls are still touching despite of this. What am I doing wrong ? do I have to put border spacing on every control instead? why doesn't child sizing work ? Lazarus 2.0.12 r64642 FPC 3.2.0 x86_64-win64-win32/win64 ---------------------------------------------------------------------- wp · 2023-11-27 14:38 The word "ChildSizing" is not used anywhere in customflowpanel.inc, therefore I guess that TFlowPanel uses its own layout procedure and ChildSizing is not effective. It works to set the BorderSpacing of the child controls, and you can simplify this by calling Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure FlowPanelMargins(APanel: TFlowPanel; Margin: Integer);var  i: Integer;begin  for i := 0 to APanel.ControlCount-1 do    APanel.Controls[i].BorderSpacing.Around := Margin;end; But note that there is a difference here also: while normally the Around spaces are allowed to overlap, they do not overlap here and must be added, in other words: when you set Margin to 5 the distance between controls will be 10, but the outer margin will be 5. To have the left-most, right-most, top-most and bottom-most margins at the same visual value you should additionally set the FlowPanel's BorderWidth to 5. ---------------------------------------------------------------------- Joanna · 2023-11-28 13:53 I’ve also noticed that in addition to border width.around there is also aroundleft /right/top/bottom. What is the purpose of those?