In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

Shared Imagelists

Xailer professional forum in English
Responder
Oleg
Mensajes: 474
Registrado: Mié Jun 07, 2006 3:45 pm

Shared Imagelists

Mensaje 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.
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

Shared Imagelists

Mensaje 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
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

Shared Imagelists

Mensaje 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
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Oleg
Mensajes: 474
Registrado: Mié Jun 07, 2006 3:45 pm

Shared Imagelists

Mensaje 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)Â
Oleg
Mensajes: 474
Registrado: Mié Jun 07, 2006 3:45 pm

Shared Imagelists

Mensaje 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)Â
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

Shared Imagelists

Mensaje 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)Â
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

Shared Imagelists

Mensaje 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)Â
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Oleg
Mensajes: 474
Registrado: Mié Jun 07, 2006 3:45 pm

Shared Imagelists

Mensaje por Oleg »

Jose,
> We'll fix those three controls ASAP. Thanks for your feedback.
I will wait. Thanks for your support.
Regards, Oleg
Oleg
Mensajes: 474
Registrado: Mié Jun 07, 2006 3:45 pm

Shared Imagelists

Mensaje por Oleg »

Jose,
> We'll fix those three controls ASAP. Thanks for your feedback.
I will wait. Thanks for your support.
Regards, Oleg
Responder