UpdateLayout at Runtime lazarus / 43-Android ---------------------------------------------------------------------- ADiV · 2018-09-28 06:21 Hello, as you know "UpdateLayout" at run time does not work correctly on most components. I'm working on this and I see that to work properly "UpdateLayout" by component we would have to put the following lines of code: 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  lbTest.PosRelativeToAnchor := []; lbTest.PosRelativeToParent := [rpCenterInParent]; lbTest.ResetAllRules(); lbTest.UpdateLayout();  The problem that "ResetAllRules" is not implemented in all the visual components, so it would be necessary to implement it. And the operation of this function alone does not make any sense, ideally this function should be included in "UpdateLayout" as follows: 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 jTextView.UpdateLayout();begin  if FInitialized then  begin   ResetAllRules();    inherited UpdateLayout();      UpdateLParamWidth;   UpdateLParamHeight;   jTextView_setLayoutAll(FjEnv, FjObject , Self.AnchorId);  end;end;  So we would have a cleaner and more functional code: 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  lbTest.PosRelativeToAnchor := []; lbTest.PosRelativeToParent := [rpCenterInParent]; lbTest.UpdateLayout();