Bug in PosRelativeToAnchor lazarus / 43-Android ---------------------------------------------------------------------- ADiV · 2018-09-26 15:40 Hi, I am trying to execute this code, which modifies the properties of "PosRelativeToAnchor" at runtime and does not work: 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 TAndroidModule1.btTestClick(Sender: TObject);begin lbTest2.Anchor := b tTest; lbTest2.PosRelativeToParent:=[rpCenterHorizontal]; lbTest2.PosR elativeToAnchor:=[raBelow]; lbTest2.ResetAllRules(); lbTest2.UpdateLay out();end; I think I know why, if we modify these lines, it would work correctly, I've tried it and it works (in "androidwidget.pas"): 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 jVisualControl.UpdateLayout();begin    if Self.Anchor <> nil then     Self.AnchorId:= Self.Anchor.Id    else     Self.AnchorId:= -1;end; Attached example of the test performed, I assume that in other components will have the same problem. ---------------------------------------------------------------------- jmpessoa · 2018-09-26 16:25 I will commit your fix! Thank you!!!