Using AnchorDocking and avoid resizing lazarus / 5-Lazarus Extra Components ---------------------------------------------------------------------- bastynator · 2016-07-03 19:01 Hey, i am using AnchorDocking for an application and it looks quite cool. But now i have the problem, that AnchorDocking ignores the constrains of the main form. The 'minide' example also has this problem (/usr/share/lazarus/1.6/components/anchordocking/minide) The user can resize the top-toolbar, i attached a screenshot to illustrate the behavior i want to avoid. In lazarus itself, you can't resize the toolbar (that's what i want), so it must be possible to avoid this. Has anybody an idea to do so? ---------------------------------------------------------------------- bastynator · 2017-12-19 08:32 I found a way how to avoid this resizing. I create an own splitter-class (DockMaster.SplitterClass := TMySplitter). Then i override the protected method SetParent, see below. I set a check-function whether splitter-movement is allowed and i set the visibility for the splitter. I allow resizing for all anchor-dock-host-sites but not for the main application since this would resize the toolbar. 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 TMySplitter.SetParent(NewParent: TWinControl);begin  inherited SetParent(NewParent);  OnCanResize := MyOnCanResize;  Visible := NewParent is TAnchorDockHostSite;end;     procedure TMySplitter.MyOnCanResize(Sender: TObject; var NewSize: Integer;  var Accept: Boolean);begin  Accept := Parent is TAnchorDockHostSite;end; ---------------------------------------------------------------------- JuhaManninen · 2017-12-19 09:46 Quote from: bastynator on July 03, 2016, 09:01:22 pm(/usr/share/lazarus/1.6/components/anchordocking/minide) Use Lazarus 1.8. AnchorDocking has improved there. ---------------------------------------------------------------------- bastynator · 2018-03-08 14:04 @JuhaManninen Ah ok, i did not find the improvement in this case. Can you point me to the right position to use the improvement? ---------------------------------------------------------------------- JuhaManninen · 2018-03-08 17:10 Quote from: bastynator on March 08, 2018, 03:04:38 pmAh ok, i did not find the improvement in this case. Can you point me to the right position to use the improvement? Ok, maybe there are no improvements for this particular issue. However there are many bug fixes and a new example called minidewithdockpanel. It is from Andrey Zubarev who uses AnchorDocking in his own project and fixed many bugs while testing it. Your splitter solution looks good and simple. The solution used by Lazarus can be found in unit MainBar, procedure TMainIDEBar.DoSetMainIDEHeight(). It is more complex.