[Solved] Height of TLabel inside custom TPanel lazarus / 31-LCL ---------------------------------------------------------------------- lainz · 2018-04-09 19:23 Hi, my custom control is located here https://github.com/Arandusoft/fpcpaymowidget/tree/master/controls As well as a simple test project https://github.com/Arandusoft/fpcpaymowidget/tree/master/controls/test _autocomplete Is an autocomplete control that uses a Label, an Edit and a ListBox. What I need is to know the height of the Label in the Create event of the component (https://github.com/Arandusoft/fpcpaymowidget/blob/maste r/controls/autocompletepanel.pas#L166): 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 FLabel.Height Because I set the height of the component based on 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 Height := FLabel.Height + FEdit.Height; But seems that FLabel.Height is not known in the Create event yet. And also there is no Canvas available to at least try to measure the height. It's a bug? There is a way to get the Label height on Create? Thanks. ---------------------------------------------------------------------- lainz · 2018-04-09 19:49 Solved. It was that I did not call: 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 SetInitialBounds(0, 0, 200, FLabel.Height + FEdit.Height); But height of label is available, maybe I get confused by not rebuilding the IDE?