Buttons shrinks when moving toolbar from one CoolBar to another. lazarus / 31-LCL ---------------------------------------------------------------------- regs · 2016-08-18 07:51 There is a sample. First  button loads frame with two buttons. One button moves toolbar up to form, another moves it down to frame. But time to time buttons gets shrink. Caption gets ignored. It seems TToolButton.GetTextSize returns 0, 0. Caption is there, but Canvas.TextExtent(S), gives 0, 0. https://yadi.sk/d/Cj2AEASHuJTWS Any further ideas? ---------------------------------------------------------------------- regs · 2016-08-18 11:51 Seem only to happen in Win32. No problem in qt4 and GTK2. Windows.GetTextExtentPoint32W(DC, PWideChar(W), Length(W), @Size) returns False and 0,0 in some time though Handle, Str and Count provided correctly. ---------------------------------------------------------------------- regs · 2016-08-18 17:25 Using FToolBar.Canvas.TextExtent(S) seem to work, but are ToolButtons necessarily to be on the ToolBar? If no could be 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     if Assigned(FToolBar) then    Result := FToolBar.Canvas.TextExtent(S)  else    Result := Canvas.TextExtent(S);  In TToolButton.GetTextSize ---------------------------------------------------------------------- Ondrej Pokorny · 2016-08-20 14:39 It's maybe this issue: http://mantis.freepascal.org/view.php?id=30003 ---------------------------------------------------------------------- regs · 2016-08-20 19:23 seems like. reposted there.