passing the right value in TFilenameEdit lazarus / 31-LCL ---------------------------------------------------------------------- mangakissa · 2016-02-05 15:33 For the first time I'm using  TFileNameEdit to get a directory. To extract the directory with the value returned from the dialogname I call property AcceptFileName: 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 TFrmOptions.EDefaultAcceptFileName(Sender: TObject; var Value: String);begin  EDefault.Text := ExtractFileDir(Value);end;            But Edefault.text gets the whole value of the variabele 'Value' and not the extracted directory. How do I get the right value to EDefault.Text? ---------------------------------------------------------------------- FTurtle · 2016-02-05 16:31 QuoteAcceptFileName(Sender: TObject; var Value: String); 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 TFrmOptions.EDefaultAcceptFileName(Sender: TObject; var Value: String);begin  Value := ExtractFileDir(Value);end;