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.

Treeview Images

Xailer English public forum
Responder
awr
Mensajes: 26
Registrado: Mar Jul 25, 2006 11:16 pm

Treeview Images

Mensaje por awr »

Is there a way to have root elements in a treeview show an image but not in
the child elements? I can assign a TImagelist to the TreeView , but the root
*and* childs indent with a blank space for an image.
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5706
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

Treeview Images

Mensaje por jfgimenez »

Andrew,
> Is there a way to have root elements in a treeview show an image but not
> in the child elements? I can assign a TImagelist to the TreeView , but the
> root *and* childs indent with a blank space for an image.
It's the windows behavior, AFAIK.
IF you are using a rather simple treeview, perhaps could be replaced by an
optionlist, which allow to set images to items individually.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
aross
Mensajes: 24
Registrado: Vie Jul 28, 2006 1:38 am

Treeview Images

Mensaje por aross »

I tried the option list which I think it a better looking solution, but I
didn't see a way to highlight the selected option. With the button style, is
there a way to alter or highlight the selected button so the user knows the
context?
I want to switch data entry screens when the user selects an option, but I
also want to have some of the same effects as a treeview. For example, the
lSingleExpand option on the Treeview control is great for collapsing all
root items but I had to program the same for option lists -- collapse all
expanded option lists in the explorer bar other than the one clicked on.
I just don't see a way to highlight the selected button item in an option
list. I can assign a pointer graphic using the OnClick event of the button
item, but I would need to cycle through the other options an assign 0 to the
other options images in the list. Maybe you have a better solution.
Thanks,
Andy
"Jose F. Gimenez" <jfgimenez@wanadoo.es> wrote in message
news:[email=44c9e46e@news.xailer.com...]44c9e46e@news.xailer.com...[/email]
> Andrew,
>
>> Is there a way to have root elements in a treeview show an image but not
>> in the child elements? I can assign a TImagelist to the TreeView , but
>> the root *and* childs indent with a blank space for an image.
>
> It's the windows behavior, AFAIK.
>
> IF you are using a rather simple treeview, perhaps could be replaced by an
> optionlist, which allow to set images to items individually.
>
>
> --
> Regards,
>
> Jose F. Gimenez
> http://www.xailer.com
>
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5706
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

Treeview Images

Mensaje por jfgimenez »

Andrew,
>I tried the option list which I think it a better looking solution, but I
>didn't see a way to highlight the selected option. With the button style,
>is there a way to alter or highlight the selected button so the user knows
>the context?
No, sorry. I've just added a note to our BTS to do it in the future.
> I want to switch data entry screens when the user selects an option, but I
> also want to have some of the same effects as a treeview. For example, the
> lSingleExpand option on the Treeview control is great for collapsing all
> root items but I had to program the same for option lists -- collapse all
> expanded option lists in the explorer bar other than the one clicked on.
>
> I just don't see a way to highlight the selected button item in an option
> list. I can assign a pointer graphic using the OnClick event of the button
> item, but I would need to cycle through the other options an assign 0 to
> the other options images in the list. Maybe you have a better solution.
No, sorry. You have to do it programatically.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Responder