Página 1 de 1

Shared Imagelists

Publicado: Lun Jul 09, 2007 3:43 pm
por Oleg
Dear developers!
Is there any way to create some ImageLists one time and use them many times
later in some forms? I was not able to achieve this because these ImageLists
are destroyed every time when the Form with imagelist is destroyed.
Regards, Oleg.

Shared Imagelists

Publicado: Lun Jul 09, 2007 5:37 pm
por jfgimenez
Oleg,
> Is there any way to create some ImageLists one time and use them many
> times later in some forms? I was not able to achieve this because these
> ImageLists are destroyed every time when the Form with imagelist is
> destroyed.
It depends on the imagelist's parent. Its parent is responsible of
destroying the IL. So, if a IL's parent is a control, then when that control
is destroyed the IL is destroyed too. If its parent is a form, the form
destroys the IL.
But... you maight create a IL in the main form (so, it's destroyed only when
the app is going to finish), and later assign it to the controls you want.
I.e.:
::oTreeView1:oImageList := Application:oMainForm:oImageList1
In this case, the treeview does not destroy the IL when it's destroyed.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info

Shared Imagelists

Publicado: Lun Jul 09, 2007 5:37 pm
por jfgimenez
Oleg,
> Is there any way to create some ImageLists one time and use them many
> times later in some forms? I was not able to achieve this because these
> ImageLists are destroyed every time when the Form with imagelist is
> destroyed.
It depends on the imagelist's parent. Its parent is responsible of
destroying the IL. So, if a IL's parent is a control, then when that control
is destroyed the IL is destroyed too. If its parent is a form, the form
destroys the IL.
But... you maight create a IL in the main form (so, it's destroyed only when
the app is going to finish), and later assign it to the controls you want.
I.e.:
::oTreeView1:oImageList := Application:oMainForm:oImageList1
In this case, the treeview does not destroy the IL when it's destroyed.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info

Shared Imagelists

Publicado: Mar Jul 10, 2007 1:00 pm
por Oleg
Jose!
> But... you maight create a IL in the main form (so, it's destroyed only
> when
> the app is going to finish), and later assign it to the controls you want.
> I.e.:
>
> ::oTreeView1:oImageList := Application:oMainForm:oImageList1
>
> In this case, the treeview does not destroy the IL when it's destroyed.
It would be great if it would work in this way :)
Attached sample demonstrates that the Imagelists are destroyed in this case.
Try to click Button1 twice.
Regards, Oleg


Attached files test31.zip (5.1 KB)Â

Shared Imagelists

Publicado: Mar Jul 10, 2007 1:00 pm
por Oleg
Jose!
> But... you maight create a IL in the main form (so, it's destroyed only
> when
> the app is going to finish), and later assign it to the controls you want.
> I.e.:
>
> ::oTreeView1:oImageList := Application:oMainForm:oImageList1
>
> In this case, the treeview does not destroy the IL when it's destroyed.
It would be great if it would work in this way :)
Attached sample demonstrates that the Imagelists are destroyed in this case.
Try to click Button1 twice.
Regards, Oleg


Attached files test31.zip (5.1 KB)Â

Shared Imagelists

Publicado: Jue Jul 12, 2007 11:24 am
por jfgimenez
Oleg,
> It would be great if it would work in this way :)
It should work fine, but there is a bug in the controls treeview, toolbar
and browse. All other controls that use a IL are working fine (tab, folder,
optionlist, menu, combobox, header, notifyicon, rebar, statusbar, ...); see
the atached sample.
We'll fix those three controls ASAP. Thanks for your feedback.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info


Attached files test31.zip (5.3 KB)Â

Shared Imagelists

Publicado: Jue Jul 12, 2007 11:24 am
por jfgimenez
Oleg,
> It would be great if it would work in this way :)
It should work fine, but there is a bug in the controls treeview, toolbar
and browse. All other controls that use a IL are working fine (tab, folder,
optionlist, menu, combobox, header, notifyicon, rebar, statusbar, ...); see
the atached sample.
We'll fix those three controls ASAP. Thanks for your feedback.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info


Attached files test31.zip (5.3 KB)Â

Shared Imagelists

Publicado: Vie Jul 13, 2007 7:16 am
por Oleg
Jose,
> We'll fix those three controls ASAP. Thanks for your feedback.
I will wait. Thanks for your support.
Regards, Oleg

Shared Imagelists

Publicado: Vie Jul 13, 2007 7:16 am
por Oleg
Jose,
> We'll fix those three controls ASAP. Thanks for your feedback.
I will wait. Thanks for your support.
Regards, Oleg