Thanks, I saw the demos, I see now how it works. But how can I add multiple
resolution to ImageList? Is it possible only with suffixes and all images must
be in the same directory? I need to push 10 resolution to one ImageList.
Default res. is 16x16 and the others are 20, 24, 28, 32, 40, 48, 56, 64 and 80.
How should I do it?
V.
______________________________________________________________
Od: Ondrej Pokorny via Lazarus <lazarus@lists.lazarus-ide.org>
Komu: lazarus@lists.lazarus-ide.org
Datum: 23.05.2018 17:33
Předmět: Re: [Lazarus] New Image Lists question
On 23.05.2018 16:07, Vojtěch Čihák via Lazarus wrote:
> I have application where user can choose size of toolbars, i.e. I have
several image lists named IL16, IL20, IL24, IL32, IL48 and I switch them in
property TToolBar.Images. In meanwhile, TImageList was redesigned to work with
hi-DPI desktops.
> Now, I can load more images to each imagelist, with suffix _150 and _200. But
it will cause dupicities, because icon16_150 and icon16_200 will have size 24 and
32 respectively, which are already stored in IL24 and IL32.
>
> Question is: how can I do it without duplicities?
You don't need several image lists any more. Delete IL20, IL24, IL32 and
IL48 use only IL16 where you load all the images.
Read:
http://wiki.freepascal.org/Lazarus_1.10.0_release_notes#TCustomImageList_.2F_TImageList
<http://wiki.freepascal.org/Lazarus_1.10.0_release_notes#TCustomImageList_.2F_TImageList>
http://wiki.freepascal.org/TImageList <http://wiki.freepascal.org/TImageList>
Demos:
examples/imagelist_highdpi_designtime
examples/imagelist_highdpi_runtime
Ondrej
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus
<https://lists.lazarus-ide.org/listinfo/lazarus>
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus