[Lazarus] Package directory at runtime
Krzysztof
dibo20 at wp.pl
Fri May 11 20:06:52 CEST 2012
That was exactly what I needed! Thanks Mattias
2012/5/11 Mattias Gaertner <nc-gaertnma at netcologne.de>:
> On Fri, 11 May 2012 18:01:32 +0200
> Krzysztof <dibo20 at wp.pl> wrote:
>
>> Hmm. Is an easier way? The point is that my package with visual
>> controls, has subcatalog "styles". In design mode, when user open
>> style manager (double click on control) then I would like to display
>> all files in that directory. For the first time I could ask the user
>> for the path to the package, but where then save this path? In
>> Lazarus's home directory?
>
> At designtime you can find the package directory easily:
>
> uses MacroIntf; // package IDEIntf
>
> Dir:='$PkgDir(YourPkgName)';
> IDEMacros.SubstituteMacros(Dir);
>
> Mattias
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
More information about the Lazarus
mailing list