| View previous topic :: View next topic |
| Author |
Message |
Juan Ignacio Videla Guest
|
Posted: Tue Jan 20, 2004 1:01 pm Post subject: How can I use the stateimages in a treeview component? |
|
|
I want to know how to display the stateimages in runtime? any idea...
|
|
| Back to top |
|
 |
Pete Fraser Guest
|
Posted: Tue Jan 20, 2004 4:12 pm Post subject: Re: How can I use the stateimages in a treeview component? |
|
|
You need to set up an ImageList component with the images you want.
Then set the StateImages of the TreeView to the ImageList.
Then for each Node you create, set the StateIndex to reference the Image you
want to show. If it's -1 then no image is shown.
HTH Pete
"Juan Ignacio Videla" <juavid (AT) cartif (DOT) es> wrote
| Quote: | I want to know how to display the stateimages in runtime? any idea...
|
|
|
| Back to top |
|
 |
Juan Ignacio Videla Guest
|
Posted: Wed Jan 21, 2004 6:34 am Post subject: Re: How can I use the stateimages in a treeview component? |
|
|
I did it but no image appears at all... what action do I have to do to
over the treeview so that this image appears. thks
Pete Fraser wrote:
| Quote: | You need to set up an ImageList component with the images you want.
Then set the StateImages of the TreeView to the ImageList.
Then for each Node you create, set the StateIndex to reference the Image you
want to show. If it's -1 then no image is shown.
HTH Pete
"Juan Ignacio Videla" <juavid (AT) cartif (DOT) es> wrote in message
news:400d269a$1 (AT) newsgroups (DOT) borland.com...
I want to know how to display the stateimages in runtime? any idea...
|
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Wed Jan 21, 2004 6:52 am Post subject: Re: How can I use the stateimages in a treeview component? |
|
|
"Juan Ignacio Videla" <juavid (AT) cartif (DOT) es> wrote
| Quote: | I did it but no image appears at all... what action do I
have to do to over the treeview so that this image appears.
|
Peter already told you everything you need to do. If no images are
appearing, then you did not do everything. Please explain, in detail, step
by step, everything that you have actually done.
Gambit
|
|
| Back to top |
|
 |
Juan Ignacio Videla Guest
|
Posted: Wed Jan 21, 2004 6:58 am Post subject: Re: How can I use the stateimages in a treeview component? |
|
|
First i setup the imagelist component, then i change the stateimage
property of the treeview with this imagelist. Then in the item editor I
set the stateindex to 0. And then when I run the application, the icon
does not appear.... may be I am not doing the apropiate action to
display... when this icon is supposed to appear?
| Quote: | "Juan Ignacio Videla" <juavid (AT) cartif (DOT) es> wrote in message
news:400e1d84$1 (AT) newsgroups (DOT) borland.com...
I did it but no image appears at all... what action do I
have to do to over the treeview so that this image appears.
Peter already told you everything you need to do. If no images are
appearing, then you did not do everything. Please explain, in detail, step
by step, everything that you have actually done.
Gambit
|
|
|
| Back to top |
|
 |
Juan Ignacio Videla Guest
|
Posted: Wed Jan 21, 2004 7:42 am Post subject: Re: How can I use the stateimages in a treeview component? |
|
|
It started working when I use the stateindex=1. When I use 0 value it
does not work... thanks anyway.
Juan Ignacio Videla wrote:
| Quote: | First i setup the imagelist component, then i change the stateimage
property of the treeview with this imagelist. Then in the item editor I
set the stateindex to 0. And then when I run the application, the icon
does not appear.... may be I am not doing the apropiate action to
display... when this icon is supposed to appear?
"Juan Ignacio Videla" <juavid (AT) cartif (DOT) es> wrote in message
news:400e1d84$1 (AT) newsgroups (DOT) borland.com...
I did it but no image appears at all... what action do I
have to do to over the treeview so that this image appears.
Peter already told you everything you need to do. If no images are
appearing, then you did not do everything. Please explain, in detail,
step
by step, everything that you have actually done.
Gambit
|
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Wed Jan 21, 2004 7:20 pm Post subject: Re: How can I use the stateimages in a treeview component? |
|
|
"Juan Ignacio Videla" <juavid (AT) cartif (DOT) es> wrote
| Quote: | It started working when I use the stateindex=1. When
I use 0 value it does not work... thanks anyway.
|
State indexes do not work the same way as normal indexes. Index 0 has
special meaning and cannot be used for a state image.
Gambit
|
|
| Back to top |
|
 |
Juan Ignacio Videla Guest
|
Posted: Thu Jan 22, 2004 10:51 am Post subject: Re: How can I use the stateimages in a treeview component? |
|
|
When I use the stateindex equal to zero, i get no gap where the icon
should appear... it seems useful, if I want to leave no gap at some
level... where for example no icon is necessary. Do you know if there is
a similar index value for the imageindex case.
Remy Lebeau (TeamB) wrote:
| Quote: | "Juan Ignacio Videla" <juavid (AT) cartif (DOT) es> wrote in message
news:400e2d81 (AT) newsgroups (DOT) borland.com...
It started working when I use the stateindex=1. When
I use 0 value it does not work... thanks anyway.
State indexes do not work the same way as normal indexes. Index 0 has
special meaning and cannot be used for a state image.
Gambit
|
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Thu Jan 22, 2004 8:03 pm Post subject: Re: How can I use the stateimages in a treeview component? |
|
|
"Juan Ignacio Videla" <juavid (AT) cartif (DOT) es> wrote
| Quote: | When I use the stateindex equal to zero, i get no gap where
the icon should appear...
|
That is correct. Index 0 tells the TreeView not to display any icon at all.
| Quote: | Do you know if there is a similar index value for the imageindex case.
|
For the ImageIndex property, set it to -1 to not display an icon.
Gambit
|
|
| Back to top |
|
 |
|