<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 21, 2016 at 6:05 PM, Bo Berglund <span dir="ltr"><<a href="mailto:bo.berglund@gmail.com" target="_blank">bo.berglund@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">On Thu, 21 Jul 2016 17:24:00 -0400, Dmitry Boyarintsev<br>
</span><br>
Cannot check if it will work the same yet because of the conditional<br>
errors checking the Delphi version.<br>
But it seems like it does not have a property for the directory name,<br>
maybe I can use the FileName property instead?<br></blockquote></div><br></div><div class="gmail_extra">If you're reading/assigning directory name in run-time (rather than design time), you could (conditionally for FPC) add a class helper for TSelectDirectoryDialog, emulating TFolderDialog the property <br><br></div><div class="gmail_extra">Something like this:<br><br></div><div class="gmail_extra">{$ifdef fpc}<br></div><div class="gmail_extra"> TSelectDirectoryDialogForFolderDialog = class helper for TSelectDirectoryDialog<br> private<br> function GetDirName: string;<br> procedure SetDirName(const AValue: string);<br> public<br></div><div class="gmail_extra"> // the property name should match the one used for TFolderDialog<br></div><div class="gmail_extra"> // in order to prevent any changes in the code.<br></div><div class="gmail_extra"> property DirectoryName: string read GetDirName write SetDirName;<br> end;<br></div><div class="gmail_extra">{$endif}<br><br></div>implementation<br><div class="gmail_extra">...<br><div class="gmail_extra">{$ifdef fpc}<br></div>function TSelectDirectoryDialogForFolderDialog.GetDirName: string;<br>begin<br></div><div class="gmail_extra"> Result:=Self.FileName;<br></div><div class="gmail_extra">end;<br><br></div><div class="gmail_extra">procedure TSelectDirectoryDialogForFolderDialogSetDirName(const AValue: string);<br></div><div class="gmail_extra">begin<br></div><div class="gmail_extra"> Self.FileName:=Avalue;<br></div><div class="gmail_extra">end;<br></div><div class="gmail_extra"></div><div class="gmail_extra">{$endif}<br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">thanks,<br></div><div class="gmail_extra">Dmitry<br></div><div class="gmail_extra"><br><br></div></div>